[vlc-commits] png: use vlc_alloc helper

Thomas Guillem git at videolan.org
Sat Nov 11 18:59:58 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:42:16 2017 +0100| [b94dc63d91033fa1a86009394acef3519ba74e07] | committer: Thomas Guillem

png: use vlc_alloc helper

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

 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 af9e7fcdbf..9bcbdf4796 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -289,7 +289,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
     if( !p_pic ) goto error;
 
     /* Decode picture */
-    p_row_pointers = malloc( sizeof(png_bytep) * i_height );
+    p_row_pointers = vlc_alloc( i_height, sizeof(png_bytep) );
     if( !p_row_pointers )
         goto error;
     for( i = 0; i < (int)i_height; i++ )



More information about the vlc-commits mailing list