Thread (7 messages) flat view 7 messages, 3 authors, 2021-07-13

Re: [PATCH bpf-next v3 2/2] libbpf: Fix the possible memory leak caused by obj->kconfig

From: Dan Carpenter <hidden>
Date: 2021-07-10 14:44:00
Also in: bpf, kernel-janitors, lkml

On Fri, Jul 09, 2021 at 10:47:53AM +0800, Shuyi Cheng wrote:
When obj->kconfig is NULL, ERR_PTR(-ENOMEM) should not be returned
directly, err=-ENOMEM should be set, and then goto out.
The commit message needs to say what the problem is that the patch is
fixing.  Here is a better commit message:

[PATCH bpf-next v3 2/2] libbpf: Fix the possible memory leak on error

If the strdup() fails then we need to call bpf_object__close(obj) to
avoid a resource leak.

Add a Fixes tag as well.

regards,
dan carpenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help