Browse Source

Bug 690584 - #10691 ldbm_back_init() - fix coverity resource leak issues

https://bugzilla.redhat.com/show_bug.cgi?id=690584
Resolves: bug 690584
Bug Description: #10691 ldbm_back_init() - fix coverity resource leak issues
Reviewed by: nkinder (Thanks!)
Branch: master
Fix Description: also have to free li and set the pblock pointer to NULL
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
Rich Megginson 14 years ago
parent
commit
9ea3531355
1 changed files with 2 additions and 0 deletions
  1. 2 0
      ldap/servers/slapd/back-ldbm/init.c

+ 2 - 0
ldap/servers/slapd/back-ldbm/init.c

@@ -280,6 +280,8 @@ ldbm_back_init( Slapi_PBlock *pb )
 
 fail:
 	dblayer_terminate( li );
+	slapi_ch_free((void **)&li);
+	slapi_pblock_set( pb, SLAPI_PLUGIN_PRIVATE, NULL );
 	return( -1 );
 }