From 3bfe4a7f77adfcfc41ca4f7e8d08159328646cd0 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 4 Apr 2006 10:58:08 +0000 Subject: [PATCH] plug leaks --- servers/slapd/overlays/lastmod.c | 4 ++++ servers/slapd/overlays/retcode.c | 1 + 2 files changed, 5 insertions(+) diff --git a/servers/slapd/overlays/lastmod.c b/servers/slapd/overlays/lastmod.c index fb5bda9651..f669709fc2 100644 --- a/servers/slapd/overlays/lastmod.c +++ b/servers/slapd/overlays/lastmod.c @@ -767,6 +767,7 @@ lastmod_db_init( Debug( LDAP_DEBUG_ANY, "lastmod_init: " "null OID for attributeType '%s'\n", mat[i].name, 0, 0 ); + ldap_attributetype_free( at ); return -1; } @@ -775,6 +776,7 @@ lastmod_db_init( Debug( LDAP_DEBUG_ANY, "lastmod_init: " "%s in attributeType '%s'\n", scherr2str(code), mat[i].name, 0 ); + ldap_attributetype_free( at ); return -1; } ldap_memfree(at); @@ -810,6 +812,7 @@ lastmod_db_init( Debug( LDAP_DEBUG_ANY, "objectClass '%s' has no OID\n" , moc[i].name, 0, 0 ); + ldap_objectclass_free( oc ); return -1; } @@ -818,6 +821,7 @@ lastmod_db_init( Debug( LDAP_DEBUG_ANY, "objectClass '%s': %s \"%s\"\n" , moc[i].name, scherr2str(code), err ); + ldap_objectclass_free( oc ); return -1; } diff --git a/servers/slapd/overlays/retcode.c b/servers/slapd/overlays/retcode.c index 8b09f73361..44a1b709c0 100644 --- a/servers/slapd/overlays/retcode.c +++ b/servers/slapd/overlays/retcode.c @@ -788,6 +788,7 @@ retcode_db_config( } else { fprintf( stderr, "retcode: unknown op \"%s\"\n", ops[ j ] ); + ldap_charray_free( ops ); return 1; } }