summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-07-26 14:32:18 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2018-07-27 07:18:44 +0200
commit1e960043e8ae65d6f53b3414586a3fb634461908 (patch)
tree7fe3914c4ce7da570106058da6d6a32007fd702f /samples
parent2367bd99f62bd952fea5c534eeb1d84c113da38e (diff)
tools: libbpf: handle NULL program gracefully in bpf_program__nth_fd()
bpf_map__fd() handles NULL map gracefully and returns -EINVAL. bpf_program__fd() and bpf_program__nth_fd() crash in this case. Make the behaviour more consistent by validating prog pointer as well. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions