git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3eec829
)
s3:registry: don't leak to talloc_stack in regdb_store_keys_internal2()
author
Michael Adam
<obnox@samba.org>
Wed, 8 Jul 2009 22:21:46 +0000
(
00:21
+0200)
committer
Michael Adam
<obnox@samba.org>
Wed, 15 Jul 2009 12:01:53 +0000
(14:01 +0200)
and catch one potential talloc failure.
Michael
source3/registry/reg_backend_db.c
patch
|
blob
|
history
diff --git
a/source3/registry/reg_backend_db.c
b/source3/registry/reg_backend_db.c
index 542f6dc7d0dd5e4420464706cceac7127240d583..6bf98d4c7564004c702e921e5459a8c09141f004 100644
(file)
--- a/
source3/registry/reg_backend_db.c
+++ b/
source3/registry/reg_backend_db.c
@@
-623,14
+623,21
@@
static WERROR regdb_store_keys_internal2(struct db_context *db,
WERROR werr;
if (!key) {
- return WERR_INVALID_PARAM;
+ werr = WERR_INVALID_PARAM;
+ goto done;
}
keyname = talloc_strdup(ctx, key);
if (!keyname) {
- return WERR_NOMEM;
+ werr = WERR_NOMEM;
+ goto done;
}
+
keyname = normalize_reg_path(ctx, keyname);
+ if (!keyname) {
+ werr = WERR_NOMEM;
+ goto done;
+ }
/* allocate some initial memory */