[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[augeas-devel] augeas: master - * src/lens.c (lens_release): allow NULL lens to be passed in



Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=7bcfdcc32f85cf3a577adedc5794a9c97d1f7310
Commit:        7bcfdcc32f85cf3a577adedc5794a9c97d1f7310
Parent:        34f0fa898eca9a09039b9ab00966a865c2281e51
Author:        David Lutterkort <lutter redhat com>
AuthorDate:    Wed Mar 18 13:43:32 2009 -0700
Committer:     David Lutterkort <lutter redhat com>
CommitterDate: Thu Mar 19 10:41:40 2009 -0700

* src/lens.c (lens_release): allow NULL lens to be passed in

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

diff --git a/src/lens.c b/src/lens.c
index 07f44cb..295baef 100644
--- a/src/lens.c
+++ b/src/lens.c
@@ -696,6 +696,8 @@ void free_lens(struct lens *lens) {
 }
 
 void lens_release(struct lens *lens) {
+    if (lens == NULL)
+        return;
     regexp_release(lens->ctype);
     regexp_release(lens->atype);
     if (lens->tag == L_KEY || lens->tag == L_STORE)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]