]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
url: Correction to scope of if statements when setting data
authorSteve Holme <steve_holme@hotmail.com>
Sat, 20 Apr 2013 18:10:10 +0000 (19:10 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Sat, 20 Apr 2013 18:10:10 +0000 (19:10 +0100)
lib/url.c

index 7b12372893e645f95e818e98c270169b47ba9f6d..4f995ab54936bbb0dfc1d1d5df932496a030aeab 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -332,19 +332,22 @@ static CURLcode setstropt_userpwd(char *option, char **user_storage,
                                (options_storage ? &optionsp : NULL));
   if(!result) {
     /* store username part of option */
-    if(user_storage)
+    if(user_storage) {
       Curl_safefree(*user_storage);
       *user_storage = userp;
+    }
 
     /* store password part of option */
-    if(pwd_storage)
+    if(pwd_storage) {
       Curl_safefree(*pwd_storage);
       *pwd_storage = passwdp;
+    }
 
     /* store options part of option */
-    if(options_storage)
+    if(options_storage) {
       Curl_safefree(*options_storage);
       *options_storage = optionsp;
+    }
   }
 
   return result;