X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fcancel.c;h=f3677b13a4be52ffbb23718088895f484830b19f;hb=f82ca15a1862749e13a989599d7f4c52c7648957;hp=2cf54b75cc94095ea1d3bba1add71ad9bd2b12c5;hpb=1cde3108192b580332a26753fb9a45c890cd2147;p=openldap diff --git a/libraries/libldap/cancel.c b/libraries/libldap/cancel.c index 2cf54b75cc..f3677b13a4 100644 --- a/libraries/libldap/cancel.c +++ b/libraries/libldap/cancel.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2014 The OpenLDAP Foundation. + * Copyright 1998-2017 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,14 +42,14 @@ ldap_cancel( int *msgidp ) { BerElement *cancelidber = NULL; - struct berval *cancelidvalp = NULL; + struct berval cancelidvalp = { 0, NULL }; int rc; cancelidber = ber_alloc_t( LBER_USE_DER ); ber_printf( cancelidber, "{i}", cancelid ); - ber_flatten( cancelidber, &cancelidvalp ); + ber_flatten2( cancelidber, &cancelidvalp, 0 ); rc = ldap_extended_operation( ld, LDAP_EXOP_CANCEL, - cancelidvalp, sctrls, cctrls, msgidp ); + &cancelidvalp, sctrls, cctrls, msgidp ); ber_free( cancelidber, 1 ); return rc; } @@ -62,14 +62,14 @@ ldap_cancel_s( LDAPControl **cctrls ) { BerElement *cancelidber = NULL; - struct berval *cancelidvalp = NULL; + struct berval cancelidvalp = { 0, NULL }; int rc; cancelidber = ber_alloc_t( LBER_USE_DER ); ber_printf( cancelidber, "{i}", cancelid ); - ber_flatten( cancelidber, &cancelidvalp ); + ber_flatten2( cancelidber, &cancelidvalp, 0 ); rc = ldap_extended_operation_s( ld, LDAP_EXOP_CANCEL, - cancelidvalp, sctrls, cctrls, NULL, NULL ); + &cancelidvalp, sctrls, cctrls, NULL, NULL ); ber_free( cancelidber, 1 ); return rc; }