mh->bm_sequence, mh, mh->bm_length, ber_int_options.lbo_meminuse);
#endif
/* Fill the free space with poison */
- memset( mh, 0xff, mh->bm_length + sizeof(struct ber_mem_hdr) + sizeof( ber_int_t));
+ memset( mh, 0xff, mh->bm_length + sizeof(struct ber_mem_hdr) + sizeof(ber_int_t));
free( mh );
#else
free( p );
BER_MEM_VALID( bv );
- if ( bv->bv_val != NULL )
+ if ( bv->bv_val != NULL ) {
LBER_FREE( bv->bv_val );
+ }
LBER_FREE( (char *) bv );
}
BER_MEM_VALID( bv );
- for ( i = 0; bv[i] != NULL; i++ )
+ for ( i = 0; bv[i] != NULL; i++ ) {
ber_bvfree( bv[i] );
+ }
LBER_FREE( (char *) bv );
}
new->bv_val[bv->bv_len] = '\0';
new->bv_len = bv->bv_len;
- return( new );
+ return new;
}
struct berval *
return NULL;
}
- if ( *s == '\0' ) {
- new->bv_val = NULL;
- new->bv_len = 0;
- return new;
- }
-
new->bv_val = (char *) s;
new->bv_len = strlen( s );
LBER_FREE( p );
}
- return( new );
+ return new;
}
char *
if( s == NULL ) {
ber_errno = LBER_ERROR_PARAM;
- return( NULL );
+ return NULL;
}
len = strlen( s ) + 1;
if ( (p = LBER_MALLOC( len )) == NULL ) {
ber_errno = LBER_ERROR_MEMORY;
- return( NULL );
+ return NULL;
}
AC_MEMCPY( p, s, len );
- return( p );
+ return p;
}