about summary refs log tree commit diff
path: root/malloc/tst-obstack.c
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2022-01-25 15:39:38 -0700
committerMartin Sebor <msebor@redhat.com>2022-01-26 10:38:23 -0700
commitc094c232eb3246154265bb035182f92fe1b17ab8 (patch)
tree4b5d30d81c1870bbda23f9d079be4509fd4d2843 /malloc/tst-obstack.c
parente4ba8fee1a8feea62f9f06099a116163848338db (diff)
downloadglibc-c094c232eb3246154265bb035182f92fe1b17ab8.tar.gz
glibc-c094c232eb3246154265bb035182f92fe1b17ab8.tar.xz
glibc-c094c232eb3246154265bb035182f92fe1b17ab8.zip
Avoid -Wuse-after-free in tests [BZ #26779].
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'malloc/tst-obstack.c')
-rw-r--r--malloc/tst-obstack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/malloc/tst-obstack.c b/malloc/tst-obstack.c
index 18af8ea62f..d80f471fa0 100644
--- a/malloc/tst-obstack.c
+++ b/malloc/tst-obstack.c
@@ -20,8 +20,8 @@ verbose_malloc (size_t size)
 static void
 verbose_free (void *buf)
 {
-  free (buf);
   printf ("free (%p)\n", buf);
+  free (buf);
 }
 
 static int