lookup_ldap.c: no need to free a result that is NULL
Subsystems (2)
PATCH 1/1 lookup_ldap.c: no need to free a result that is NULL
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 <[email protected]>
Makefile.rules +1 -1
@@ -38,7 +38,7 @@ STRIP = strip --strip-debug endif endif -CC = gcc +# CC = gcc CXX = g++ CXXFLAGS = $(CFLAGS) LD = ld
modules/lookup_ldap.c +0 -1
@@ -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);