[augeas-devel] augeas: master - aug_match, aug_mv: return -1 when pathx evaluation fails

David Lutterkort lutter at fedoraproject.org
Thu Sep 24 19:09:00 UTC 2009


Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=d92bf7da008ee94e17f9da0b2ed380fa35a392d2
Commit:        d92bf7da008ee94e17f9da0b2ed380fa35a392d2
Parent:        60fc3c8a3fd94c76700aa6fde6c9718f16bb0ac5
Author:        David Lutterkort <lutter at redhat.com>
AuthorDate:    Mon Sep 21 16:27:02 2009 -0700
Committer:     David Lutterkort <lutter at redhat.com>
CommitterDate: Mon Sep 21 17:36:18 2009 -0700

aug_match, aug_mv: return -1 when pathx evaluation fails

---
 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);




More information about the augeas-devel mailing list