[augeas-devel] augeas: master - regexp_release: allow NULL regexp
David Lutterkort
lutter at fedoraproject.org
Tue Sep 1 18:08:58 UTC 2009
Gitweb: http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=23e95600b3cc67323691cfc8e5a4f74d218c3011
Commit: 23e95600b3cc67323691cfc8e5a4f74d218c3011
Parent: eaba6ab4e34058c541ac9db949735000d73ecada
Author: David Lutterkort <lutter at redhat.com>
AuthorDate: Sun Dec 14 23:52:28 2008 -0800
Committer: David Lutterkort <lutter at redhat.com>
CommitterDate: Mon Aug 31 13:57:51 2009 -0700
regexp_release: allow NULL regexp
---
src/regexp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/regexp.c b/src/regexp.c
index 179d7c1..d3414cd 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -328,7 +328,7 @@ int regexp_nsub(struct regexp *r) {
}
void regexp_release(struct regexp *regexp) {
- if (regexp->re != NULL) {
+ if (regexp != NULL && regexp->re != NULL) {
regfree(regexp->re);
FREE(regexp->re);
}
More information about the augeas-devel
mailing list