[vlc-commits] png: decoder: fix leak (CID 1435160)

Tristan Matthews git at videolan.org
Thu Apr 26 07:19:07 CEST 2018


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Thu Apr 26 00:57:56 2018 -0400| [0c284ce20bac1dd7da23ebee03748235739f40ca] | committer: Tristan Matthews

png: decoder: fix leak (CID 1435160)

Regression from b3b7f62ce15a3faae7a7c78c2d10b4bb49a6a009

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0c284ce20bac1dd7da23ebee03748235739f40ca
---

 modules/codec/png.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/png.c b/modules/codec/png.c
index 6bdbc5a6a5..e23f6dc2ae 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -117,7 +117,7 @@ static int OpenDecoder( vlc_object_t *p_this )
 
     /* Allocate the memory needed to store the decoder's structure */
     decoder_sys_t *p_sys = malloc( sizeof(decoder_sys_t) );
-    if( p_dec->p_sys == NULL )
+    if( p_sys == NULL )
         return VLC_ENOMEM;
     p_dec->p_sys = p_sys;
 



More information about the vlc-commits mailing list