[augeas-devel] augeas: master - * src/pathx.c (free_state): allow NULL state
David Lutterkort
lutter at fedoraproject.org
Mon Feb 2 05:57:16 UTC 2009
Gitweb: http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=bb8f2174a80b918620cb841207b94f5a0c2ad7dc
Commit: bb8f2174a80b918620cb841207b94f5a0c2ad7dc
Parent: b3644ee99394eba61758080796744386d835c4b4
Author: David Lutterkort <lutter at redhat.com>
AuthorDate: Sun Feb 1 21:42:25 2009 -0800
Committer: David Lutterkort <lutter at redhat.com>
CommitterDate: Sun Feb 1 21:44:15 2009 -0800
* src/pathx.c (free_state): allow NULL state
---
src/pathx.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/pathx.c b/src/pathx.c
index 9c94640..0a0a3fe 100644
--- a/src/pathx.c
+++ b/src/pathx.c
@@ -304,6 +304,9 @@ static void free_step(struct step *step) {
}
static void free_state(struct state *state) {
+ if (state == NULL)
+ return;
+
for(int i=0; i < state->exprs_used; i++)
free_expr(state->exprs[i]);
free(state->exprs);
More information about the augeas-devel
mailing list