Hi!

Two small fixes for error handling in bpftool prog load, first patch
removes a duplicated message, second one frees resources correctly.
Multiple error messages break JSON:

# bpftool -jp prog load tracex1_kern.o /sys/fs/bpf/a
{
    "error": "can't pin the object (/sys/fs/bpf/a): File exists"
},{
    "error": "failed to pin program"
}       

Jakub Kicinski (2):
  tools: bpftool: remove duplicated error message on prog load
  tools: bpftool: remember to close the libbpf object on prog load error

 tools/bpf/bpftool/prog.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

-- 
2.17.1

Reply via email to