Commit fab974e
libbpf: Fix memory leak in bpf_program__attach_uprobe_multi
Andrii reported memory leak detected by Coverity on error path
in bpf_program__attach_uprobe_multi. Fixing that by moving
the check earlier before the offsets allocations.
Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241115115843.694337-1-jolsa@kernel.org1 parent 96a30e4 commit fab974e
1 file changed
+5
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12006 | 12006 | | |
12007 | 12007 | | |
12008 | 12008 | | |
| 12009 | + | |
| 12010 | + | |
12009 | 12011 | | |
12010 | 12012 | | |
12011 | 12013 | | |
| |||
12034 | 12036 | | |
12035 | 12037 | | |
12036 | 12038 | | |
| 12039 | + | |
| 12040 | + | |
| 12041 | + | |
12037 | 12042 | | |
12038 | 12043 | | |
12039 | 12044 | | |
| |||
12057 | 12062 | | |
12058 | 12063 | | |
12059 | 12064 | | |
12060 | | - | |
12061 | | - | |
12062 | | - | |
12063 | | - | |
12064 | | - | |
12065 | | - | |
12066 | 12065 | | |
12067 | 12066 | | |
12068 | 12067 | | |
| |||
0 commit comments