libbpf: Btf typed dump does not need to allocate dump data
authorAlan Maguire <alan.maguire@oracle.com>
Fri, 16 Jul 2021 22:46:57 +0000 (23:46 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Sat, 17 Jul 2021 00:29:56 +0000 (17:29 -0700)
commitadd192f81ab21b58471577c75e7be9c9add98223
tree6c8b85f1aef8f28ef64175e20b8fa09212d00cd6
parent04eb4dff6a64d842f7f2c85c7cb1affc5ab3ebc9
libbpf: Btf typed dump does not need to allocate dump data

By using the stack for this small structure, we avoid the need
for freeing memory in error paths.

Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/1626475617-25984-4-git-send-email-alan.maguire@oracle.com
tools/lib/bpf/btf_dump.c