Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1449183
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] samples/bpf: fix resource leak on opened file descriptor |
| Date | 2016-07-24 20:00 +0200 |
| Message-ID | <rYvQZ-2nw-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: Colin Ian King <colin.king@canonical.com> file f needs to be closed, fixes resource leak. Signed-off-by: Colin Ian King <colin.king@canonical.com> --- samples/bpf/bpf_load.c | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c index 0cfda23..5b7e71b 100644 --- a/samples/bpf/bpf_load.c +++ b/samples/bpf/bpf_load.c @@ -403,6 +403,7 @@ int load_kallsyms(void) syms[i].name = strdup(func); i++; } + fclose(f); sym_cnt = i; qsort(syms, sym_cnt, sizeof(struct ksym), ksym_cmp); return 0; -- 2.8.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] samples/bpf: fix resource leak on opened file descriptor Colin King <colin.king@canonical.com> - 2016-07-24 20:00 +0200
csiph-web