]> granicus.if.org Git - curl/commitdiff
Revert "hostip: fix compiler warning: 'variable set but not used'"
authorDaniel Stenberg <daniel@haxx.se>
Mon, 12 Mar 2018 22:52:28 +0000 (23:52 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 12 Mar 2018 22:52:59 +0000 (23:52 +0100)
This reverts commit a577059f92fc65bd6b81717f0737f897a5b34248.

The assignment really needs to be there or we risk working with an
uninitialized pointer.

lib/hostip.c

index d2ebe2fa4324cdc153adf5adbffc8c384fb3f529..8554d39d1e7f5ff1b02d9edfa34deee5c78abdc9 100644 (file)
@@ -835,7 +835,7 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data)
       char *entry_id;
       size_t entry_len;
       char address[64];
-      char *addresses;
+      char *addresses = NULL;
       char *addr_begin;
       char *addr_end;
       char *port_ptr;