winbind3: Fix CID 1107229 Uninitialized pointer read
authorVolker Lendecke <vl@samba.org>
Wed, 16 Oct 2013 19:02:42 +0000 (21:02 +0200)
committerJeremy Allison <jra@samba.org>
Sat, 19 Oct 2013 01:43:04 +0000 (03:43 +0200)
The first "goto done" would TALLOC_FREE the uninitialized "value"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Oct 19 03:43:04 CEST 2013 on sn-devel-104

source3/winbindd/winbindd_cm.c

index ace0160a1cf80bbbbdbe772d6952357606a544d2..edb2c7bac48eb8dda60a55a32df996466ff23245 100644 (file)
@@ -1565,7 +1565,8 @@ bool fetch_current_dc_from_gencache(TALLOC_CTX *mem_ctx,
                                    const char *domain_name,
                                    char **p_dc_name, char **p_dc_ip)
 {
-       char *key, *value, *p;
+       char *key, *p;
+       char *value = NULL;
        bool ret = false;
        char *dc_name = NULL;
        char *dc_ip = NULL;