# HG changeset patch # User reimar # Date 1351623238 0 # Node ID b7ec2526b402564ccece1d899d86c0730f86882c # Parent 9e06c2e4844e8d3b9323f9db6a105b9a81f4dbcd 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. diff -r 9e06c2e4844e -r b7ec2526b402 sub/spudec.c --- a/sub/spudec.c Tue Oct 30 18:37:37 2012 +0000 +++ b/sub/spudec.c Tue Oct 30 18:53:58 2012 +0000 @@ -227,7 +227,9 @@ 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; }