git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
92b1ef1
)
Do not leak memory in libnet_smbconf_setparm().
author
Michael Adam
<obnox@samba.org>
Mon, 24 Dec 2007 00:00:46 +0000
(
01:00
+0100)
committer
Michael Adam
<obnox@samba.org>
Mon, 24 Dec 2007 00:00:46 +0000
(
01:00
+0100)
Michael
(This used to be commit
a657b1c9f17d3cebc86b596f1f2d244750d70a6d
)
source3/libnet/libnet_conf.c
patch
|
blob
|
history
diff --git
a/source3/libnet/libnet_conf.c
b/source3/libnet/libnet_conf.c
index ebf2d6654ffe2f0310c0346f17475fe6712480a5..4945413bb1b735edea16942aa17efa04eb2fe6b1 100644
(file)
--- a/
source3/libnet/libnet_conf.c
+++ b/
source3/libnet/libnet_conf.c
@@
-258,10
+258,14
@@
WERROR libnet_smbconf_setparm(TALLOC_CTX *mem_ctx,
werr = libnet_smbconf_open_path(mem_ctx, service, REG_KEY_WRITE,
&key);
}
- W_ERROR_NOT_OK_RETURN(werr);
+ if (!W_ERROR_IS_OK(werr)) {
+ goto done;
+ }
werr = libnet_smbconf_reg_setvalue_internal(key, param, valstr);
+done:
+ TALLOC_FREE(key);
return werr;
}