aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/unit1303.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2011-01-05 23:53:24 -0800
committerDan Fandrich <dan@coneharvesters.com>2011-01-05 23:53:24 -0800
commitebb9c7ae04f905f86f6beddba06a9b0c3e4e0ac8 (patch)
treeec81d52e6fdc6d35cb6e8b946a0e3c12c6c4fd18 /tests/unit/unit1303.c
parent53014175e8dce8bc1ea6fbe00f1da886767d7587 (diff)
Made unit_setup() return an error code to abort the test early
This makes it possible to skip the call to unit_stop() in such cases. Also use Curl_safefree() in unit test 1302 so it will pass the memory torture test.
Diffstat (limited to 'tests/unit/unit1303.c')
-rw-r--r--tests/unit/unit1303.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/unit/unit1303.c b/tests/unit/unit1303.c
index 01fdda1f9..cabee85c2 100644
--- a/tests/unit/unit1303.c
+++ b/tests/unit/unit1303.c
@@ -9,10 +9,14 @@
static struct SessionHandle *data;
-static void unit_setup( void )
+static CURLcode unit_setup( void )
{
data = curl_easy_init();
+ if (!data)
+ return CURLE_OUT_OF_MEMORY;
+ return CURLE_OK;
}
+
static void unit_stop( void )
{
curl_easy_cleanup(data);