From 397b4d5397e87fa60e35ac1f36facf2411ebc126 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sat, 29 Dec 2007 17:06:49 +0100 Subject: [PATCH] Return NULL (instead of unchanged) for no shares/parameters defined. Michael (This used to be commit bfe3d1462f52d2849611fc58ad70fa08b4917077) --- source3/libnet/libnet_conf.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c index 300ea916cd8..3f5265a4525 100644 --- a/source3/libnet/libnet_conf.c +++ b/source3/libnet/libnet_conf.c @@ -358,6 +358,9 @@ static WERROR libnet_smbconf_reg_get_values(TALLOC_CTX *mem_ctx, if (count > 0) { *value_names = talloc_move(mem_ctx, &tmp_valnames); *value_strings = talloc_move(mem_ctx, &tmp_valstrings); + } else { + *value_names = NULL; + *value_strings = NULL; } done: @@ -486,6 +489,8 @@ WERROR libnet_smbconf_get_share_names(TALLOC_CTX *mem_ctx, uint32_t *num_shares, *num_shares = added_count; if (added_count > 0) { *share_names = talloc_move(mem_ctx, &tmp_share_names); + } else { + *share_names = NULL; } done: -- 2.34.1