[FFmpeg-devel] [PATCH 2/3] avdevice/iec61883: free packet on buffer allocation error

Marton Balint cus at passwd.hu
Sun Feb 12 14:48:49 EET 2017


On Thu, 9 Feb 2017, Marton Balint wrote:

> Fixes Coverity CID 1396416.
>
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
> libavdevice/iec61883.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/libavdevice/iec61883.c b/libavdevice/iec61883.c
> index c45ae9a..721dca3 100644
> --- a/libavdevice/iec61883.c
> +++ b/libavdevice/iec61883.c
> @@ -120,6 +120,7 @@ static int iec61883_callback(unsigned char *data, int length,
>
>     packet->buf = av_malloc(length);
>     if (!packet->buf) {
> +        av_free(packet);
>         ret = -1;
>         goto exit;
>     }
> --

Ping...

Thanks,
Marton


More information about the ffmpeg-devel mailing list