From: Pierangelo Masarati Date: Thu, 17 Jan 2002 19:33:48 +0000 (+0000) Subject: fix uninitialized pointer (ITS#1538) X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~90 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=861e9a66b576d28b2992c7c66799d08e847eee2c;p=openldap fix uninitialized pointer (ITS#1538) --- diff --git a/servers/slapd/search.c b/servers/slapd/search.c index c3a6acc34d..95a2789470 100644 --- a/servers/slapd/search.c +++ b/servers/slapd/search.c @@ -37,7 +37,7 @@ do_search( struct berval nbase = { 0, NULL }; struct berval fstr = { 0, NULL }; Filter *filter = NULL; - AttributeName *an; + AttributeName *an = NULL; ber_len_t siz, off, i; Backend *be; int rc; @@ -327,7 +327,7 @@ return_results:; if( fstr.bv_val != NULL) free( fstr.bv_val ); if( filter != NULL) filter_free( filter ); - free(an); + if( an != NULL ) free( an ); return rc; }