diff options
author | Jiasheng Jiang <[email protected]> | 2025-08-06 14:54:22 +0000 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2025-08-07 03:07:45 +0200 |
commit | c64cff64a22a59c0c02281ee9fd9d89963d14d16 (patch) | |
tree | 3ef93a63e6b37f2968b1c78a71517a95d9c62f56 /libavformat/libmodplug.c | |
parent | 446cfbfb7446208bd1592bbc0ac18ac744543563 (diff) |
examples: Add check and replace av_free() to avoid potential memory errors
Add check for the return value of av_packet_alloc() to avoid potential NULL pointer dereference.
Moreover, replace redundant av_free() with fprintf().
Fixes: 9a38184a14 ("examples/decode_audio: allocate the packet dynamically")
Signed-off-by: Jiasheng Jiang <[email protected]>
Reviewed-by: Nicolas George <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
Diffstat (limited to 'libavformat/libmodplug.c')
0 files changed, 0 insertions, 0 deletions