mirror of
https://github.com/curl/curl.git
synced 2026-08-26 16:03:33 +03:00
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:
parent
53014175e8
commit
ebb9c7ae04
5 changed files with 32 additions and 17 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue