svn commit: samba r14026 - in branches/SAMBA_3_0/source/tdb: .
jra at samba.org
jra at samba.org
Wed Mar 8 07:13:23 GMT 2006
Author: jra
Date: 2006-03-08 07:13:23 +0000 (Wed, 08 Mar 2006)
New Revision: 14026
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14026
Log:
Fix resource leak on error exit. Coverity CID #65.
Jeremy.
Modified:
branches/SAMBA_3_0/source/tdb/tdbback.c
Changeset:
Modified: branches/SAMBA_3_0/source/tdb/tdbback.c
===================================================================
--- branches/SAMBA_3_0/source/tdb/tdbback.c 2006-03-08 06:51:38 UTC (rev 14025)
+++ branches/SAMBA_3_0/source/tdb/tdbback.c 2006-03-08 07:13:23 UTC (rev 14026)
@@ -108,6 +108,7 @@
/* stat the old tdb to find its permissions */
if (stat(old_name, &st) != 0) {
perror(old_name);
+ free(tmp_name);
return 1;
}
@@ -115,6 +116,7 @@
tdb = tdb_open(old_name, 0, 0, O_RDWR, 0);
if (!tdb) {
printf("Failed to open %s\n", old_name);
+ free(tmp_name);
return 1;
}
More information about the samba-cvs
mailing list