-
由 Andrii Nakryiko 提交于
mainline inclusion from mainline-5.17-rc1 commit 8f7b239e category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8f7b239ea8cfdc8e64c875ee417fed41431a1f37 ------------------------------------------------- It's not enough to just free(map->inner_map), as inner_map itself can have extra memory allocated, like map name. Fixes: 646f02ff ("libbpf: Add BTF-defined map-in-map support") Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Signed-off-by: NAlexei Starovoitov <ast@kernel.org> Reviewed-by: NHengqi Chen <hengqi.chen@gmail.com> Link: https://lore.kernel.org/bpf/20211107165521.9240-3-andrii@kernel.org (cherry picked from commit 8f7b239e) Signed-off-by: NWang Yufen <wangyufen@huawei.com>
f40b3c79