On 09-05-2019 15:00, Moritz Barsnick wrote:

> On Thu, May 09, 2019 at 07:28:20 +0530, Shivam Goyal wrote: +    //Extra to 
> find the http header
> +    size = 2 * ARECONT_H264_MIME_SIZE + RAW_PACKET_SIZE;
> +    data = av_malloc(size);
> +
> +    if (av_new_packet(pkt, size) < 0)
> +        return AVERROR(ENOMEM); 
> memleak on error

I have tested this on the file attached to the ticket, the error didn't
came. Please, could you tell me how to solve this error and why it came.

It's a hypothetical case. You can see the memleak by code review,
without the need for actually reproducing it with a real world test.

You need to clean up your allocated memory in error paths as well.
Please see many other places in the ffmpeg code.

Oh, i missed it, i forgot to clean the allocated pkt here, 
would do in the next version of patch. 

Thanks for the review 
Shivam Goyal
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to