changeset 35178:327e3968a50b

Make uninit function handle vf->priv being NULL. This happens in the case where memory allocation for it fails.
author reimar
date Fri, 26 Oct 2012 18:39:51 +0000
parents 51b77c9a11ef
children 94565576f967
files libmpcodecs/vf_phase.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_phase.c	Fri Oct 26 18:31:11 2012 +0000
+++ b/libmpcodecs/vf_phase.c	Fri Oct 26 18:39:51 2012 +0000
@@ -242,6 +242,8 @@
 
 static void uninit(struct vf_instance *vf)
    {
+   if (!vf->priv)
+       return;
    free(vf->priv->buf[0]);
    free(vf->priv->buf[1]);
    free(vf->priv->buf[2]);