aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib1502.c
diff options
context:
space:
mode:
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;