mirror of
https://github.com/curl/curl.git
synced 2026-08-26 12:03:37 +03:00
cookies: Improved OOM handling in cookies
This fixes the test 506 torture test. The internal cookie API really ought to be improved to separate cookie parsing errors (which may be ignored) with OOM errors (which should be fatal).
This commit is contained in:
parent
c3b85c12a9
commit
41f1f6e830
3 changed files with 62 additions and 32 deletions
|
|
@ -328,17 +328,15 @@ int test(char *URL)
|
|||
if ( code != CURLE_OK )
|
||||
{
|
||||
fprintf(stderr, "curl_easy_getinfo() failed\n");
|
||||
curl_share_cleanup(share);
|
||||
curl_global_cleanup();
|
||||
return TEST_ERR_MAJOR_BAD;
|
||||
res = TEST_ERR_MAJOR_BAD;
|
||||
goto test_cleanup;
|
||||
}
|
||||
printf("loaded cookies:\n");
|
||||
if ( !cookies )
|
||||
{
|
||||
fprintf(stderr, " reloading cookies from '%s' failed\n", JAR);
|
||||
curl_share_cleanup(share);
|
||||
curl_global_cleanup();
|
||||
return TEST_ERR_MAJOR_BAD;
|
||||
res = TEST_ERR_MAJOR_BAD;
|
||||
goto test_cleanup;
|
||||
}
|
||||
printf("-----------------\n");
|
||||
next_cookie = cookies;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue