diff --git a/libraries/libldap/pagectrl.c b/libraries/libldap/pagectrl.c index bd23017ab3..8aac0c892a 100644 --- a/libraries/libldap/pagectrl.c +++ b/libraries/libldap/pagectrl.c @@ -256,7 +256,7 @@ ldap_parse_page_control( ld->ld_errno = ldap_parse_pageresponse_control( ld, c, countp, &cookie ); if ( ld->ld_errno == LDAP_SUCCESS ) { - *cookiep = LDAP_MALLOC( sizeof( struct berval * ) ); + *cookiep = LDAP_MALLOC( sizeof( struct berval ) ); if ( *cookiep == NULL ) { ld->ld_errno = LDAP_NO_MEMORY; } else {