summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/tdb/tdbback.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/tdb/tdbback.c b/source3/tdb/tdbback.c
index 3f5bf3891b..7967a6bbf5 100644
--- a/source3/tdb/tdbback.c
+++ b/source3/tdb/tdbback.c
@@ -108,6 +108,7 @@ int backup_tdb(const char *old_name, const char *new_name)
/* 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 @@ int backup_tdb(const char *old_name, const char *new_name)
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;
}