Skip to content

Instantly share code, notes, and snippets.

@bagder
Created August 28, 2023 06:19
Show Gist options
  • Save bagder/af3dadb67f8c628982f32378ff01da11 to your computer and use it in GitHub Desktop.
Save bagder/af3dadb67f8c628982f32378ff01da11 to your computer and use it in GitHub Desktop.
fix for lib539.c ?
diff --git a/tests/libtest/lib539.c b/tests/libtest/lib539.c
index 0e8aada4b..75f146c00 100644
--- a/tests/libtest/lib539.c
+++ b/tests/libtest/lib539.c
@@ -68,11 +68,11 @@ int test(char *URL)
return TEST_ERR_MAJOR_BAD;
}
slist = curl_slist_append(NULL, "SYST");
if(!slist) {
- free(newURL);
+ curl_free(newURL);
curl_easy_cleanup(curl);
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
@@ -83,11 +83,11 @@ int test(char *URL)
res = curl_easy_perform(curl);
test_cleanup:
curl_slist_free_all(slist);
- free(newURL);
+ curl_free(newURL);
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)res;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment