On Mon, 2 Jun 2014, Derek Buitenhuis wrote:

On 6/2/2014 12:42 PM, Nidhi Makhijani wrote:                                 + 
FF_INPUT_BUFFER_PADDING_SIZE);
+        if (!st->codec->extradata) {
+            av_freep(&spxp);
+            return AVERROR(ENOMEM);
+        }

I don't think you actually need to free spxp, since it is stored in os->private,
and I think that is freed on error elsewhere in the Ogg code. Someone please
feel free to correct me if I am wrong.

Not only "you don't need to", it's "you must not".

At this point, spxp is stored in os->private as you mention - if you free spxp, you'll leave a dangling pointer in os->private.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to