summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-12-29 02:16:38 +0100
committerMichael Adam <obnox@samba.org>2007-12-29 02:16:38 +0100
commit618b0efbbcc42beff60da4fe57ad6a6162b5e3f0 (patch)
tree906b34e9fe7a6e3b95b8be46ea9d770b003e5f01 /source3
parenteb356fbafc4b6e0d94b1ba75c6c466262e3221e5 (diff)
downloadsamba-618b0efbbcc42beff60da4fe57ad6a6162b5e3f0.tar.gz
samba-618b0efbbcc42beff60da4fe57ad6a6162b5e3f0.tar.bz2
samba-618b0efbbcc42beff60da4fe57ad6a6162b5e3f0.zip
Handle NULL talloc context in libnet_smbconf_format_registry_value().
Maybe we should generate a new context instead of returning NULL? Michael (This used to be commit d7aaec713e17f93eed5177f0c3468deb625402a8)
Diffstat (limited to 'source3')
-rw-r--r--source3/libnet/libnet_conf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c
index 1e9e033205..3335c37299 100644
--- a/source3/libnet/libnet_conf.c
+++ b/source3/libnet/libnet_conf.c
@@ -227,7 +227,10 @@ char *libnet_smbconf_format_registry_value(TALLOC_CTX *mem_ctx,
{
char *result = NULL;
- /* what if mem_ctx = NULL? */
+ /* alternatively, create a new talloc context? */
+ if (mem_ctx == NULL) {
+ return result;
+ }
switch (value->type) {
case REG_DWORD: