Hi, Ian,

Here's another trivial patch.  If we already know the result pointer is
null, there's no need to call ldap_msgfree on it!

Cheers,
Jeff

Signed-off-by: Jeff Moyer <jmo...@redhat.com>

diff --git a/Makefile.rules b/Makefile.rules
index f2ba386..26da6d8 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -38,7 +38,7 @@ STRIP     = strip --strip-debug
 endif
 endif
 
-CC        = gcc
+# CC        = gcc
 CXX       = g++
 CXXFLAGS  = $(CFLAGS)
 LD        = ld
diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
index 3a31a8e..d0cbdca 100644
--- a/modules/lookup_ldap.c
+++ b/modules/lookup_ldap.c
@@ -400,7 +400,6 @@ static int get_query_dn(unsigned logopt, LDAP *ldap, struct 
lookup_context *ctxt
                }
 
                if (!result) {
-                       ldap_msgfree(result);
                        error(logopt,
                              MODPREFIX "failed to find query dn under search 
base dns");
                        free(query);

_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to