diff options
author | djm@openbsd.org <djm@openbsd.org> | 2021-05-21 04:03:47 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2021-06-01 14:38:41 +1000 |
commit | 1a4d1da9188d7c88f646b61f0d6a3b34f47c5439 (patch) | |
tree | 36bb37cbda3bbd0b84d33d522471fb494dd6917b | |
parent | 60455a5d98065a73ec9a1f303345856bbd49aecc (diff) |
upstream: fix memleak in test
OpenBSD-Regress-ID: 5e529d0982aa04666604936df43242e97a7a6f81
-rw-r--r-- | regress/unittests/misc/test_argv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/regress/unittests/misc/test_argv.c b/regress/unittests/misc/test_argv.c index 7a28f64e..a422a201 100644 --- a/regress/unittests/misc/test_argv.c +++ b/regress/unittests/misc/test_argv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test_argv.c,v 1.1 2021/03/19 04:23:50 djm Exp $ */ +/* $OpenBSD: test_argv.c,v 1.2 2021/05/21 04:03:47 djm Exp $ */ /* * Regress test for misc argv handling functions. * @@ -55,6 +55,7 @@ test_argv(void) ASSERT_INT_EQ(ac, 0); ASSERT_PTR_NE(av, NULL); ASSERT_PTR_EQ(av[0], NULL); + RESET_ARGV(); TEST_DONE(); TEST_START("trivial args"); @@ -71,6 +72,7 @@ test_argv(void) ASSERT_STRING_EQ(av[0], "smiley"); ASSERT_STRING_EQ(av[1], "leamas"); ASSERT_PTR_EQ(av[2], NULL); + RESET_ARGV(); TEST_DONE(); TEST_START("quoted"); @@ -100,6 +102,7 @@ test_argv(void) ASSERT_STRING_EQ(av[0], "smiley leamas"); ASSERT_STRING_EQ(av[1], "liz"); ASSERT_PTR_EQ(av[2], NULL); + RESET_ARGV(); TEST_DONE(); TEST_START("escaped"); @@ -135,6 +138,7 @@ test_argv(void) ASSERT_STRING_EQ(av[0], "leamas\\"); ASSERT_STRING_EQ(av[1], "\\smiley"); ASSERT_PTR_EQ(av[2], NULL); + RESET_ARGV(); TEST_DONE(); /* XXX test char *argv_assemble(int argc, char **argv) */ |