jail: seccomp-oci: fix uninitialized pointer read in error path
authorDaniel Golle <daniel@makrotopia.org>
Fri, 27 Sep 2024 13:13:52 +0000 (14:13 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 6 Jan 2025 23:46:55 +0000 (23:46 +0000)
commitf2d5031c4b6819007e04566e7daab8019c93be43
tree0eea477bd54db8ba49257115aacde16c226dffc4
parent42d3937654508b04da64969f9d764ac2ec411904
jail: seccomp-oci: fix uninitialized pointer read in error path

The pointer to allocated memory 'filter' has not been assigned to
'prog->filter' when error path errout1 is used. Free 'filter' instead
of 'prog->filter' in that case.

Coverity CID 1520949 Uninitialized pointer read
Coverity CID 1521044 Resource leak
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
jail/seccomp-oci.c