mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
perf tools: Use zfree to help detect use after free bugs
Several areas already used this technique, so do some audit to consistently use it elsewhere. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-9sbere0kkplwe45ak6rk4a1f@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
046625231a
commit
74cf249d5c
29 changed files with 83 additions and 80 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue