[augeas-devel] [PATCH 8/8] aug_match, aug_mv: return -1 when pathx evaluation fails

David Lutterkort lutter at redhat.com
Tue Sep 22 00:49:05 UTC 2009


---
 src/augeas.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/augeas.c b/src/augeas.c
index fce8117..793ff31 100644
--- a/src/augeas.c
+++ b/src/augeas.c
@@ -679,6 +679,7 @@ int aug_rm(struct augeas *aug, const char *path) {
 
     result = tree_rm(p);
     free_pathx(p);
+    ERR_BAIL(aug);
 
     api_exit(aug);
     return result;
@@ -790,6 +791,7 @@ int aug_match(const struct augeas *aug, const char *pathin, char ***matches) {
         if (! TREE_HIDDEN(tree))
             cnt += 1;
     }
+    ERR_BAIL(aug);
 
     if (matches == NULL)
         goto done;
@@ -807,6 +809,7 @@ int aug_match(const struct augeas *aug, const char *pathin, char ***matches) {
         }
         i += 1;
     }
+    ERR_BAIL(aug);
  done:
     free_pathx(p);
     api_exit(aug);
-- 
1.6.2.5




More information about the augeas-devel mailing list