Return NULL (instead of unchanged) for no shares/parameters defined.
authorMichael Adam <obnox@samba.org>
Sat, 29 Dec 2007 16:06:49 +0000 (17:06 +0100)
committerMichael Adam <obnox@samba.org>
Sat, 29 Dec 2007 16:06:49 +0000 (17:06 +0100)
Michael

source/libnet/libnet_conf.c

index 300ea916cd85718db7d91cda3d2b8291fb4afdbc..3f5265a4525838e4e4d509a7cca72c21aec578a9 100644 (file)
@@ -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: