summaryrefslogtreecommitdiff
path: root/source/tdb/tdbback.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/tdb/tdbback.c')
-rw-r--r--source/tdb/tdbback.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/tdb/tdbback.c b/source/tdb/tdbback.c
index 3f5bf3891b3..7967a6bbf54 100644
--- a/source/tdb/tdbback.c
+++ b/source/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;
}