From 40ef77a8f8df46f57019cb5814a74b549ddca5d9 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 5 Jun 2002 15:51:42 +0000 Subject: [PATCH] Add error handling cleanup --- libraries/libldap/getdn.c | 2 ++ libraries/libldap/vlvctrl.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index 37e9a827ab..4dd2279ee5 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -90,6 +90,8 @@ ldap_get_dn( LDAP *ld, LDAPMessage *entry ) Debug( LDAP_DEBUG_TRACE, "ldap_get_dn\n", 0, 0, 0 ); #endif + assert( ld != NULL ); + assert( LDAP_VALID(ld) ); assert( entry != NULL ); tmp = *entry->lm_ber; /* struct copy */ diff --git a/libraries/libldap/vlvctrl.c b/libraries/libldap/vlvctrl.c index b1638cfe89..0ee5ed2ab4 100644 --- a/libraries/libldap/vlvctrl.c +++ b/libraries/libldap/vlvctrl.c @@ -80,6 +80,7 @@ ldap_create_vlv_control( LDAP *ld, BerElement *ber; assert( ld != NULL ); + assert( LDAP_VALID( ld ) ); assert( vlvinfop != NULL ); assert( ctrlp != NULL ); @@ -203,6 +204,7 @@ ldap_parse_vlv_control( ber_len_t berLen; assert( ld != NULL ); + assert( LDAP_VALID( ld ) ); if (contextp) { *contextp = NULL; /* Make sure we return a NULL if error occurs. */ -- 2.39.5