]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/delete.c
ITS#6254
[openldap] / libraries / libldap / delete.c
index dcb2bde47e779038cccd5b1666268d4b2a31d5be..63e6162bed800b2ed03e02e24dd07f3fbbe73012 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2009 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -120,7 +120,7 @@ ldap_delete_ext_s(
        if( rc != LDAP_SUCCESS )
                return( ld->ld_errno );
 
-       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 );
 
        return( ldap_result2error( ld, res, 1 ) );