X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=libraries%2Flibldap%2Fmodify.c;h=81844a4f8404141b6e6c97bbb2a47ff8d9657d63;hb=6062cd9777bd2e1d9d99e5b3d5e25d0dab87f7ba;hp=45ccfbc98a3cc30cae66ab57197fbc76a30a9fd9;hpb=4587e053e7ac2f4e80ac6ca66607190de0f1fc69;p=openldap diff --git a/libraries/libldap/modify.c b/libraries/libldap/modify.c index 45ccfbc98a..81844a4f84 100644 --- a/libraries/libldap/modify.c +++ b/libraries/libldap/modify.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2006 The OpenLDAP Foundation. + * Copyright 1998-2012 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -201,7 +201,7 @@ ldap_modify_ext_s( LDAP *ld, LDAP_CONST char *dn, if ( rc != LDAP_SUCCESS ) 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 ); return( ldap_result2error( ld, res, 1 ) );