summaryrefslogtreecommitdiff
path: root/tests/libtest/lib1502.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-12-24 14:04:34 +0100
committerYang Tse <yangsita@gmail.com>2012-12-25 13:34:43 +0100
commite125eea5a6d9a07dfd9e28f5238b502e707e7ab8 (patch)
treef82e1cc4a2135ac8c2bd76e79f41238759bbd849 /tests/libtest/lib1502.c
parent1649e680f62450a29589c23c64a67267e9e439f2 (diff)
downloadgnurl-e125eea5a6d9a07dfd9e28f5238b502e707e7ab8.tar.gz
gnurl-e125eea5a6d9a07dfd9e28f5238b502e707e7ab8.tar.bz2
gnurl-e125eea5a6d9a07dfd9e28f5238b502e707e7ab8.zip
test 1504 and 1505: same as 1502 but with different cleanup sequences
Diffstat (limited to 'tests/libtest/lib1502.c')
-rw-r--r--tests/libtest/lib1502.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/libtest/lib1502.c b/tests/libtest/lib1502.c
index 4cf89c4ab..2b50c4733 100644
--- a/tests/libtest/lib1502.c
+++ b/tests/libtest/lib1502.c
@@ -20,6 +20,9 @@
*
***************************************************************************/
/*
+ * This source code is used for lib1502, lib1503, lib1504 and lib1505 with
+ * only #ifdefs controlling the cleanup sequence.
+ *
* Test case 1502 converted from bug report #3575448, identifying a memory
* leak in the CURLOPT_RESOLVE handling with the multi interface.
*/
@@ -108,7 +111,6 @@ test_cleanup:
#ifdef LIB1502
/* undocumented cleanup sequence - type UA */
-
curl_multi_cleanup(multi);
curl_easy_cleanup(easy);
curl_global_cleanup();
@@ -116,13 +118,27 @@ test_cleanup:
#ifdef LIB1503
/* proper cleanup sequence - type PA */
-
curl_multi_remove_handle(multi, easy);
curl_multi_cleanup(multi);
curl_easy_cleanup(easy);
curl_global_cleanup();
#endif
+#ifdef LIB1504
+ /* undocumented cleanup sequence - type UB */
+ curl_easy_cleanup(easy);
+ curl_multi_cleanup(multi);
+ curl_global_cleanup();
+#endif
+
+#ifdef LIB1505
+ /* proper cleanup sequence - type PB */
+ curl_multi_remove_handle(multi, easy);
+ curl_easy_cleanup(easy);
+ curl_multi_cleanup(multi);
+ curl_global_cleanup();
+#endif
+
curl_slist_free_all(dns_cache_list);
return res;