On Sun, 16 Feb 2025 17:08:33 +0100 Ariel Otilibili <ariel.otilib...@6wind.com> wrote:
> rte_pcapng_close() might dereference a null pointer; as example, > PVS-Studio gives its usage in test_pcapng.c: indeed, that call to > rte_pcapng_close() might receive a null pointer. > > Link: https://pvs-studio.com/en/docs/warnings/v522/ > Link: > https://github.com/DPDK/dpdk/blob/e5176f23ae8b31437c3e5eb875c81f95bf3a9942/app/test/test_pcapng.c#L438 > Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files") > Signed-off-by: Ariel Otilibili <ariel.otilib...@6wind.com> Not sure this is necessary. The analgous function is fclose() and calling fclose() with NULL will crash. I would rather update the documentation than silently ignore buggy programs.