testsuite: Fix leaks in tree-dynamic-object-size-0.c
commit955093369ed41e7ad7d9e4fadc2948375a6cb103
authorSiddhesh Poyarekar <siddhesh@gotplt.org>
Thu, 8 Dec 2022 15:21:17 +0000 (8 10:21 -0500)
committerSiddhesh Poyarekar <siddhesh@gotplt.org>
Thu, 8 Dec 2022 15:21:18 +0000 (8 10:21 -0500)
tree4d5696854b13a41ba9089da90dd38a9e8581f563
parentd9f9d5d30feb33c359955d7030cc6be50ef6dc0a
testsuite: Fix leaks in tree-dynamic-object-size-0.c

In commit e5cfb9cac1d7aba9a8ea73bfe7922cfaff9d61f3 I introduced tests
for strdup and strndup with leaks.  Fix those leaks.

gcc/testsuite/ChangeLog:

* gcc.dg/builtin-dynamic-object-size-0.c (test_strdup,
test_strndup, test_strdup_min, test_strndup_min): Free RES
before returning from function.

Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
gcc/testsuite/gcc.dg/builtin-dynamic-object-size-0.c