]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/passwd.c
ITS#7942 plug leak in controls
[openldap] / libraries / libldap / passwd.c
index 704e495b1a16dc11ed5ece459cfe67ab26c1d9d9..f18c9c7e20d3b6e0d151e3853b32834991f4ecbd 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2007 The OpenLDAP Foundation.
+ * Copyright 1998-2014 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;
        }