shithub: dav1d

Download patch

ref: a0fb010fd0bd8e465b8ac2d5234f3bd16a94b2ad
parent: 488374c79eed9be44fd5b08fa9b52ec9ecaa21f7
author: Janne Grunau <[email protected]>
date: Sat Dec 8 14:13:20 EST 2018

picture: free pic_ctx on dav1d_ref_wrap error

--- a/src/picture.c
+++ b/src/picture.c
@@ -133,6 +133,7 @@
 
     if (!(p->ref = dav1d_ref_wrap(p->data[0], free_buffer, pic_ctx))) {
         p_allocator->release_picture_callback(p, p_allocator->cookie);
+        free(pic_ctx);
         fprintf(stderr, "Failed to wrap picture: %s\n", strerror(errno));
         return -ENOMEM;
     }