Skip to content
Snippets Groups Projects

Check for valid input in dav1d_data_unref

Merged James Almer requested to merge jamrial/dav1d:data_unref into master
1 file
+ 6
1
Compare changes
  • Side-by-side
  • Inline
+ 6
1
@@ -65,6 +65,11 @@ int dav1d_data_wrap(Dav1dData *const buf, uint8_t *const ptr, const size_t sz,
}
void dav1d_data_unref(Dav1dData *const buf) {
dav1d_ref_dec(buf->ref);
validate_input(buf != NULL);
if (buf->ref) {
validate_input(buf->data != NULL);
dav1d_ref_dec(buf->ref);
}
memset(buf, 0, sizeof(*buf));
}
Loading