s3:libsmb: always init cli->{server_os,server_domain,server_type}
authorStefan Metzmacher <metze@samba.org>
Tue, 20 Sep 2011 03:23:53 +0000 (05:23 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 16 Nov 2011 13:07:35 +0000 (14:07 +0100)
We should do that at creation time of cli_state.

metze

source3/libsmb/clientgen.c

index db980a486db7a20adb724af0224dab180d97ae52..bc544afd32476dd839e643867d68b22920957dbd 100644 (file)
@@ -190,6 +190,19 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
                return NULL;
        }
 
+       cli->server_domain = talloc_strdup(cli, "");
+       if (!cli->server_domain) {
+               goto error;
+       }
+       cli->server_os = talloc_strdup(cli, "");
+       if (!cli->server_os) {
+               goto error;
+       }
+       cli->server_type = talloc_strdup(cli, "");
+       if (!cli->server_type) {
+               goto error;
+       }
+
        cli->dfs_mountpoint = talloc_strdup(cli, "");
        if (!cli->dfs_mountpoint) {
                goto error;