]> Git Repo - linux.git/blobdiff - tools/perf/util/strlist.c
perf tools: Use zfree to help detect use after free bugs
[linux.git] / tools / perf / util / strlist.c
index eabdce0a2daa0a0a2c5c882529617322ce6e8852..61a90bf24b4db93da3757a08aeb7b70ec2ef9015 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include "strlist.h"
+#include "util.h"
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -38,7 +39,7 @@ out_delete:
 static void str_node__delete(struct str_node *snode, bool dupstr)
 {
        if (dupstr)
-               free((void *)snode->s);
+               zfree((void **)&snode->s);
        free(snode);
 }
 
This page took 0.029823 seconds and 4 git commands to generate.