Commit 9b258141 authored by Rémi Duraffort's avatar Rémi Duraffort

pudec: fix potential memleaks.

parent 834d3847
...@@ -119,6 +119,7 @@ subpicture_t * ParsePacket( decoder_t *p_dec ) ...@@ -119,6 +119,7 @@ subpicture_t * ParsePacket( decoder_t *p_dec )
{ {
/* There was a parse error, delete the subpicture */ /* There was a parse error, delete the subpicture */
decoder_DeleteSubpicture( p_dec, p_spu ); decoder_DeleteSubpicture( p_dec, p_spu );
free( p_spu_data );
return NULL; return NULL;
} }
...@@ -127,6 +128,7 @@ subpicture_t * ParsePacket( decoder_t *p_dec ) ...@@ -127,6 +128,7 @@ subpicture_t * ParsePacket( decoder_t *p_dec )
{ {
/* There was a parse error, delete the subpicture */ /* There was a parse error, delete the subpicture */
decoder_DeleteSubpicture( p_dec, p_spu ); decoder_DeleteSubpicture( p_dec, p_spu );
free( p_spu_data );
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment