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

[augeas-devel] augeas: master - * src/lens.c (lens_release): tolerate a NULL lens



Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=75a1b5a4749d72ee13ab47d9a36cc568e73b529a
Commit:        75a1b5a4749d72ee13ab47d9a36cc568e73b529a
Parent:        3674bf7334b965cccd6e255ad4de4572b093b785
Author:        David Lutterkort <lutter redhat com>
AuthorDate:    Tue Jan 5 17:20:06 2010 -0800
Committer:     David Lutterkort <lutter redhat com>
CommitterDate: Tue Jan 5 17:20:06 2010 -0800

* src/lens.c (lens_release): tolerate a NULL lens

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

diff --git a/src/lens.c b/src/lens.c
index 68f5468..cb9b54c 100644
--- a/src/lens.c
+++ b/src/lens.c
@@ -693,6 +693,9 @@ void free_lens(struct lens *lens) {
 }
 
 void lens_release(struct lens *lens) {
+    if (lens == NULL)
+        return;
+
     for (int t=0; t < ntypes; t++)
         regexp_release(ltype(lens, t));
 



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