diff options
author | Michael Adam <obnox@samba.org> | 2007-12-24 01:00:46 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2007-12-24 01:00:46 +0100 |
commit | 713221e1c52db2df787ec8ec66c14f17b168cc78 (patch) | |
tree | 313298f0e3e9a3b686bf254112fb2e3387f2581a /source3/libnet | |
parent | 92b1ef15df560c9cc0429bc5ecb4084efe05610f (diff) | |
download | samba-713221e1c52db2df787ec8ec66c14f17b168cc78.tar.gz samba-713221e1c52db2df787ec8ec66c14f17b168cc78.tar.bz2 samba-713221e1c52db2df787ec8ec66c14f17b168cc78.zip |
Do not leak memory in libnet_smbconf_setparm().
Michael
(This used to be commit a657b1c9f17d3cebc86b596f1f2d244750d70a6d)
Diffstat (limited to 'source3/libnet')
-rw-r--r-- | source3/libnet/libnet_conf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c index ebf2d6654f..4945413bb1 100644 --- 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; } |