From a75feeaa239c35473c3d8f27b539df126beda81f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 15 Jun 2010 14:25:12 +0200 Subject: s3-tdb: Added missing out of memory check in rename_file_with_suffix(). --- source3/lib/tdb_validate.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit