Commit 387186fc authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Stop mergers if dup returns NULL.

parent 87675a95
......@@ -67,6 +67,8 @@ Attribute *attr_dup( Attribute *a )
for( i=0; a->a_vals[i] != NULL; i++ ) {
tmp->a_vals[i] = ber_bvdup( a->a_vals[i] );
if( tmp->a_vals[i] == NULL ) break;
}
tmp->a_vals[i] = NULL;
......
......@@ -41,6 +41,7 @@ value_add_fast(
for ( i = 0, j = 0; i < naddvals; i++, j++ ) {
if ( addvals[i]->bv_len > 0 ) {
(*vals)[nvals + j] = ber_bvdup( addvals[i] );
if( (*vals)[nvals + j] == NULL ) break;
}
}
(*vals)[nvals + j] = NULL;
......@@ -72,7 +73,8 @@ value_add(
for ( i = 0, j = 0; i < nn; i++ ) {
if ( addvals[i]->bv_len > 0 ) {
(*vals)[n + j++] = ber_bvdup( addvals[i] );
(*vals)[n + j] = ber_bvdup( addvals[i] );
if( (*vals)[n + j++] == NULL ) break;
}
}
(*vals)[n + j] = NULL;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment