aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/bpf/libbpf.h
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <[email protected]>2019-11-02 12:09:37 +0100
committerAlexei Starovoitov <[email protected]>2019-11-02 12:35:06 -0700
commitd1b4574a4b86565325ef2e545eda8dfc9aa07c60 (patch)
tree7907b692db1946516b5930afe570116129d10cd2 /tools/lib/bpf/libbpf.h
parent78db77fab1c6673215f7021369bd6b3a7f04e6d8 (diff)
libbpf: Fix error handling in bpf_map__reuse_fd()
bpf_map__reuse_fd() was calling close() in the error path before returning an error value based on errno. However, close can change errno, so that can lead to potentially misleading error messages. Instead, explicitly store errno in the err variable before each goto. Signed-off-by: Toke Høiland-Jørgensen <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/libbpf.h')
0 files changed, 0 insertions, 0 deletions