From: Andre Noll Date: Sun, 22 May 2011 09:20:30 +0000 (+0200) Subject: oggdec: Trivial cleanups. X-Git-Tag: v0.4.8~3^2~2 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=f4199ba97f6a12b0af8b6f71d47392919edb6db9;p=paraslash.git oggdec: Trivial cleanups. --- diff --git a/oggdec_filter.c b/oggdec_filter.c index 042e13b0..6f416182 100644 --- a/oggdec_filter.c +++ b/oggdec_filter.c @@ -92,24 +92,22 @@ static const ov_callbacks ovc = { static void ogg_open(struct filter_node *fn) { - struct private_oggdec_data *pod = para_calloc( - sizeof(struct private_oggdec_data)); - - fn->private_data = pod; + fn->private_data = para_calloc(sizeof(struct private_oggdec_data)); fn->min_iqs = 8000; } static void ogg_close(struct filter_node *fn) { struct private_oggdec_data *pod = fn->private_data; - if (pod->vf) { + + if (pod && pod->vf) { PARA_DEBUG_LOG("ov_clearing %p, pod = %p\n", pod->vf, pod); ov_clear(pod->vf); free(pod->vf); pod->vf = NULL; } else PARA_DEBUG_LOG("nothing to close\n"); - free(fn->private_data); + free(pod); fn->private_data = NULL; }