git.samba.org
/
kamenim
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dbcffb
)
s3-tdb: Added missing out of memory check in rename_file_with_suffix().
author
Andreas Schneider
<asn@samba.org>
Tue, 15 Jun 2010 12:25:12 +0000
(14:25 +0200)
committer
Andreas Schneider
<asn@samba.org>
Wed, 16 Jun 2010 12:31:40 +0000
(14:31 +0200)
source3/lib/tdb_validate.c
patch
|
blob
|
history
diff --git
a/source3/lib/tdb_validate.c
b/source3/lib/tdb_validate.c
index b4d0365dd4fd4fdf684b8fb47ecb764b840729fa..c5cb1b44d4c6a027782b38bfe1ddefde53ecfa3a 100644
(file)
--- 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);