1
0
mirror of https://github.com/moparisthebest/curl synced 2025-02-28 17:31:46 -05:00

test585: Fixed NULL pointer dereference in fopen

This commit is contained in:
Dan Fandrich 2014-05-01 11:00:30 +02:00
parent 3d77d013e1
commit c303107345

View File

@ -91,9 +91,9 @@ int test(char *URL)
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
if(!res) { if(!res) {
FILE *moo;
res = curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ipstr); res = curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ipstr);
moo = fopen(libtest_arg2, "wb"); if (libtest_arg2) {
FILE *moo = fopen(libtest_arg2, "wb");
if(moo) { if(moo) {
double time_namelookup; double time_namelookup;
double time_connect; double time_connect;
@ -130,6 +130,7 @@ int test(char *URL)
fclose(moo); fclose(moo);
} }
} }
}
test_cleanup: test_cleanup: