diff options
author | Paolo Bonzini | 2019-08-09 16:53:39 +0200 |
---|---|---|
committer | Paolo Bonzini | 2019-08-09 16:53:39 +0200 |
commit | 0e1c438c44dd9cde56effb44c5f1cfeda72e108d (patch) | |
tree | fa3492d4d7d8b7444e5d8ebe6c78210826333e4b /tools/perf/util/srccode.c | |
parent | selftests: kvm: Adding config fragments (diff) | |
parent | arm64: KVM: hyp: debug-sr: Mark expected switch fall-through (diff) | |
download | kernel-qcow2-linux-0e1c438c44dd9cde56effb44c5f1cfeda72e108d.tar.gz kernel-qcow2-linux-0e1c438c44dd9cde56effb44c5f1cfeda72e108d.tar.xz kernel-qcow2-linux-0e1c438c44dd9cde56effb44c5f1cfeda72e108d.zip |
Merge tag 'kvmarm-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/arm fixes for 5.3
- A bunch of switch/case fall-through annotation, fixing one actual bug
- Fix PMU reset bug
- Add missing exception class debug strings
Diffstat (limited to 'tools/perf/util/srccode.c')
-rw-r--r-- | tools/perf/util/srccode.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/perf/util/srccode.c b/tools/perf/util/srccode.c index 684b155c222a..adfcf1ff464c 100644 --- a/tools/perf/util/srccode.c +++ b/tools/perf/util/srccode.c @@ -4,7 +4,8 @@ * Copyright (c) 2017, Intel Corporation. * Author: Andi Kleen */ -#include "linux/list.h" +#include <linux/list.h> +#include <linux/zalloc.h> #include <stdlib.h> #include <sys/mman.h> #include <sys/stat.h> @@ -82,12 +83,12 @@ static void fill_lines(char **lines, int maxline, char *map, int maplen) static void free_srcfile(struct srcfile *sf) { - list_del(&sf->nd); + list_del_init(&sf->nd); hlist_del(&sf->hash_nd); map_total_sz -= sf->maplen; munmap(sf->map, sf->maplen); - free(sf->lines); - free(sf->fn); + zfree(&sf->lines); + zfree(&sf->fn); free(sf); num_srcfiles--; } @@ -153,7 +154,7 @@ static struct srcfile *find_srcfile(char *fn) out_map: munmap(h->map, sz); out_fn: - free(h->fn); + zfree(&h->fn); out_h: free(h); return NULL; |