svn commit: samba r14027 - in trunk/source/tdb: .
jra at samba.org
jra at samba.org
Wed Mar 8 07:13:37 GMT 2006
Author: jra
Date: 2006-03-08 07:13:29 +0000 (Wed, 08 Mar 2006)
New Revision: 14027
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14027
Log:
Fix resource leak on error exit. Coverity CID #65.
Jeremy.
Modified:
trunk/source/tdb/tdbback.c
Changeset:
Modified: trunk/source/tdb/tdbback.c
===================================================================
--- trunk/source/tdb/tdbback.c 2006-03-08 07:13:23 UTC (rev 14026)
+++ trunk/source/tdb/tdbback.c 2006-03-08 07:13:29 UTC (rev 14027)
@@ -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