diff options
author | Andreas Schneider <asn@samba.org> | 2010-06-15 14:25:12 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2010-06-16 14:31:40 +0200 |
commit | a75feeaa239c35473c3d8f27b539df126beda81f (patch) | |
tree | 68ad3491b376b2840a492578a528d4c4324092af /source3/lib | |
parent | 6dbcffb51d979094cbdac80df5e9480475230137 (diff) | |
download | samba-a75feeaa239c35473c3d8f27b539df126beda81f.tar.gz samba-a75feeaa239c35473c3d8f27b539df126beda81f.tar.bz2 samba-a75feeaa239c35473c3d8f27b539df126beda81f.zip |
s3-tdb: Added missing out of memory check in rename_file_with_suffix().
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/tdb_validate.c | 4 |
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); |