]> granicus.if.org Git - curl/commitdiff
url: remove dead code
authorDaniel Stenberg <daniel@haxx.se>
Thu, 19 Sep 2019 07:29:02 +0000 (09:29 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 20 Sep 2019 06:07:13 +0000 (08:07 +0200)
Fixes warning detected by PVS-Studio
Fixes #4374

lib/url.c

index e4c1ac838441e68928b1bf98986a98e1ca262237..e4c47930a54a22d8424227cfed660a68c8f282d2 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2761,13 +2761,6 @@ static CURLcode set_login(struct connectdata *conn)
       result = CURLE_OUT_OF_MEMORY;
   }
 
-  /* if there's a user without password, consider password blank */
-  if(conn->user && !conn->passwd) {
-    conn->passwd = strdup("");
-    if(!conn->passwd)
-      result = CURLE_OUT_OF_MEMORY;
-  }
-
   return result;
 }