mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
Fix ITS#2142
This commit is contained in:
parent
54570d22ca
commit
9cfcdc432b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user