summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/tdb_validate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/tdb_validate.c b/source3/lib/tdb_validate.c
index b4d0365dd4..c5cb1b44d4 100644
--- a/source3/lib/tdb_validate.c
+++ b/source3/lib/tdb_validate.c
@@ -355,6 +355,10 @@ static int rename_file_with_suffix(TALLOC_CTX *ctx, const char *path,
char *dst_path;
dst_path = talloc_asprintf(ctx, "%s%s", path, suffix);
+ if (dst_path == NULL) {
+ DEBUG(3, ("error out of memory\n"));
+ return ret;
+ }
ret = (rename(path, dst_path) != 0);