s3:rpcclient: Initialize domain_name
authorAndreas Schneider <asn@samba.org>
Mon, 12 Nov 2018 09:09:23 +0000 (10:09 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 14 Nov 2018 04:07:15 +0000 (05:07 +0100)
This could be passed uninitialized to dcerpc_netr_DsRGetDCName()

Found by cppcheck.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13680

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/rpcclient/cmd_netlogon.c

index 8d62ef7e095d3cbbf97f00f6966d250a9698a65b..631740562c61793a316f80e8d23def4339a99326 100644 (file)
@@ -216,7 +216,7 @@ static WERROR cmd_netlogon_dsr_getdcname(struct rpc_pipe_client *cli,
        WERROR werr = WERR_OK;
        uint32_t flags = DS_RETURN_DNS_NAME;
        const char *server_name = cli->desthost;
-       const char *domain_name;
+       const char *domain_name = NULL;
        struct GUID domain_guid = GUID_zero();
        struct GUID site_guid = GUID_zero();
        struct netr_DsRGetDCNameInfo *info = NULL;