From 78899a096f7777094516d3a0e323b2fe2315ae3c Mon Sep 17 00:00:00 2001 From: reimar Date: Tue, 30 Oct 2012 18:53:58 +0000 Subject: spudec: set pointers to NULL after free Set pointers to NULL after free. For the pal_image one it would have been possible to leak the old pointer of the malloc for "image" failed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35303 b3059339-0415-0410-9bf9-f77b7e298cf2 --- sub/spudec.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sub') diff --git a/sub/spudec.c b/sub/spudec.c index 47e1676e2e..431a161e9d 100644 --- a/sub/spudec.c +++ b/sub/spudec.c @@ -228,7 +228,9 @@ static int spudec_alloc_image(spudec_handle_t *this, int stride, int height) if (this->image_size < this->stride * this->height) { if (this->image != NULL) { free(this->image); + this->image = NULL; free(this->pal_image); + this->pal_image = NULL; this->image_size = 0; this->pal_width = this->pal_height = 0; } -- cgit v1.2.3