shithub: dav1d

Download patch

ref: f55ac48c3fa5f7b42cfbead6389379ff599740c2
parent: 9fb690fa9449ae9b14c00739e4393ddbd61270a9
author: Janne Grunau <janne-vlc@jannau.net>
date: Thu Nov 1 09:12:27 EDT 2018

dav1d_ref_dec: always set the ref pointer to NULL

--- a/src/ref.c
+++ b/src/ref.c
@@ -80,6 +80,7 @@
 
     if (atomic_fetch_sub(&ref->ref_cnt, 1) == 1) {
         ref->free_callback(ref->const_data, ref->user_data);
-        freep(pref);
+        free(ref);
     }
+    *pref = NULL;
 }