shithub: dav1d

Download patch

ref: 60ff3002e7f36ec6291a78dd7abda531b99b2257
parent: 93550d8856ef8154e744a0afc4eb89cff584a6f7
author: James Almer <jamrial@gmail.com>
date: Thu Jan 10 18:38:13 EST 2019

ref: properly free the data buffer in dav1d_ref_create on failure

It was allocated with dav1d_alloc_aligned(), so a simple free() is
not correct.

--- a/src/ref.c
+++ b/src/ref.c
@@ -45,7 +45,7 @@
 
     res = dav1d_ref_wrap(data, default_free_callback, data);
     if (!res) {
-        free(data);
+        dav1d_free_aligned(data);
     } else {
         res->data = data;
     }