]> The Tcpdump Group git mirrors - libpcap/commit
Plug some memory leaks.
authorGuy Harris <[email protected]>
Wed, 17 Oct 2018 20:29:19 +0000 (13:29 -0700)
committerGuy Harris <[email protected]>
Wed, 17 Oct 2018 20:29:19 +0000 (13:29 -0700)
commit947f2be1e0345bbd6f66f6c945ad51eb7f074e8a
treecad0d2e5ee7bbf1a8df95db2defd21e8e0134028
parentbcbef226ca11662342b5e267e7f12066bcfd60d0
Plug some memory leaks.

The optimizer and code emitter (icode_to_fcode()) allocate their own
memory that must be cleaned up if an error is thrown, so we can't use
bpf_error(), we need to add our own error routines for them.

In some cases, just free up the memory before calling bpf_error().

Credit to OSS-Fuzz for finding this issue.
gencode.c
gencode.h
optimize.c