X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fpasswd.c;h=ac2e11220cee15f96d9947cc8b0663349dcf2708;hb=bae86317e0e19fde4aa38fdad08de8d10e3fed6c;hp=704e495b1a16dc11ed5ece459cfe67ab26c1d9d9;hpb=da6d9eb0463255782f3fa70c61fd958d94c048cf;p=openldap diff --git a/libraries/libldap/passwd.c b/libraries/libldap/passwd.c index 704e495b1a..ac2e11220c 100644 --- a/libraries/libldap/passwd.c +++ b/libraries/libldap/passwd.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2012 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -156,7 +156,7 @@ ldap_passwd_s( return rc; } - if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, &res ) == -1 ) { + if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, &res ) == -1 || !res ) { return ld->ld_errno; }