Fixed test 1300 to pass the memory torture test
authorDan Fandrich <dan@coneharvesters.com>
Fri, 24 Jun 2011 19:32:38 +0000 (12:32 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Fri, 24 Jun 2011 19:33:30 +0000 (12:33 -0700)
tests/unit/unit1300.c

index 199cf2c9e932fde8a7ff9cf844a9b0d44bf32505..2b8341683c1476791fcb34ef3b84273cfc315fff 100644 (file)
@@ -40,8 +40,10 @@ static CURLcode unit_setup(void)
   if(!llist)
     return CURLE_OUT_OF_MEMORY;
   llist_destination = Curl_llist_alloc(test_curl_llist_dtor);
-  if(!llist_destination)
+  if(!llist_destination) {
+      Curl_llist_destroy(llist, NULL);
       return CURLE_OUT_OF_MEMORY;
+  }
 
   return CURLE_OK;
 }