From: Kurt Zeilenga Date: Thu, 17 Oct 2002 16:55:42 +0000 (+0000) Subject: Fix ITS#2142 X-Git-Tag: NO_SLAP_OP_BLOCKS~879 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9cfcdc432bd89fe243adb29a91ce1d8fddad459d;p=openldap Fix ITS#2142 --- diff --git a/libraries/liblber/memory.c b/libraries/liblber/memory.c index fb68dd5c14..e2381a7665 100644 --- a/libraries/liblber/memory.c +++ b/libraries/liblber/memory.c @@ -681,7 +681,7 @@ ber_bvarray_add( BerVarray *a, BerValue *bv ) } } else { - BerVarray *atmp; + BerVarray atmp; BER_MEM_VALID( a ); for ( n = 0; *a != NULL && (*a)[n].bv_val != NULL; n++ ) { @@ -692,14 +692,14 @@ ber_bvarray_add( BerVarray *a, BerValue *bv ) return n; } - *atmp = (BerValue *) LBER_REALLOC( (char *) *a, + atmp = (BerValue *) LBER_REALLOC( (char *) *a, (n + 2) * sizeof(BerValue) ); - if( *atmp == NULL ) { + if( atmp == NULL ) { return -1; } - *a = *atmp; + *a = atmp; } (*a)[n++] = *bv;