aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2014-12-07 12:24:29 +0100
committerDan Fandrich <dan@coneharvesters.com>2014-12-09 23:58:30 +0100
commit41f1f6e830b56c35e9b545019b43a5b2889d115b (patch)
tree0cc08e16ce83736afe2b2f68b672de93887c00f2 /tests/libtest
parentc3b85c12a9261867deba27840d044ba91c7ac2ba (diff)
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).
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/lib506.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/libtest/lib506.c b/tests/libtest/lib506.c
index 2fbe38fe9..4dad0d98a 100644
--- a/tests/libtest/lib506.c
+++ b/tests/libtest/lib506.c
@@ -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;