]> www.infradead.org Git - users/jedix/linux-maple.git/commit
samples/bpf: Fix a resource leak
authorZhu Jun <zhujun2@cmss.chinamobile.com>
Thu, 10 Oct 2024 01:41:26 +0000 (18:41 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 11 Oct 2024 02:13:47 +0000 (19:13 -0700)
commitf3ef53174b23246fe9bc2bbc2542f3a3856fa1e2
treebee2c9df68dd9459c1f4081ca3d28fb0d56491dd
parentc6ca31981b545ad3081007b6aa88b6aab1b0cece
samples/bpf: Fix a resource leak

The opened file should be closed in show_sockopts(), otherwise resource
leak will occur that this problem was discovered by reading code

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241010014126.2573-1-zhujun2@cmss.chinamobile.com
samples/bpf/test_cgrp2_sock.c