summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-10-29 00:06:01 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-10-29 08:05:23 +0100
commit0b58ffe0c9213aa9398c4db3bee8945bae5b7430 (patch)
tree3e7e450b8967c5f63eaf713b70784fd5b57f6c52
parentf3a24d7916b9173c69a3e0ee790102993833d6c5 (diff)
downloadcurl-0b58ffe0c9213aa9398c4db3bee8945bae5b7430.tar.gz
unit1300: fix stack-use-after-scope AddressSanitizer warning
Closes #3186
-rw-r--r--tests/unit/unit1300.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/unit/unit1300.c b/tests/unit/unit1300.c
index 6030db0d2..5cfa6daf3 100644
--- a/tests/unit/unit1300.c
+++ b/tests/unit/unit1300.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -43,8 +43,6 @@ static CURLcode unit_setup(void)
static void unit_stop(void)
{
- Curl_llist_destroy(&llist, NULL);
- Curl_llist_destroy(&llist_destination, NULL);
}
UNITTEST_START
@@ -266,5 +264,8 @@ UNITTEST_START
fail_unless(llist_destination.tail == llist_destination.head,
"llist_destination tail doesn't equal llist_destination head");
+
+ Curl_llist_destroy(&llist, NULL);
+ Curl_llist_destroy(&llist_destination, NULL);
}
UNITTEST_STOP