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.
This commit is contained in:
Dan Fandrich 2011-01-05 23:53:24 -08:00
parent 53014175e8
commit ebb9c7ae04
5 changed files with 32 additions and 17 deletions

View file

@ -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);