From 618b0efbbcc42beff60da4fe57ad6a6162b5e3f0 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sat, 29 Dec 2007 02:16:38 +0100 Subject: 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) --- source3/libnet/libnet_conf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/libnet') 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: -- cgit