[vlc-commits] screen:win32: don't allocate more than needed

Steve Lhomme git at videolan.org
Tue Feb 20 14:01:40 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jan 29 17:34:57 2018 +0100| [289f3d66b3f90ee8ed18c9986a323faa2037a8d8] | committer: Steve Lhomme

screen:win32: don't allocate more than needed

block_t is already part of the block_sys_t structure

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

 modules/access/screen/win32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/access/screen/win32.c b/modules/access/screen/win32.c
index 4c7970ec26..00bc7fad15 100644
--- a/modules/access/screen/win32.c
+++ b/modules/access/screen/win32.c
@@ -252,7 +252,7 @@ static block_t *CaptureBlockNew( demux_t *p_demux )
     }
 
     /* Build block */
-    if( !(p_block = malloc( sizeof( block_t ) + sizeof( struct block_sys_t ) )) )
+    if( !(p_block = malloc( sizeof( struct block_sys_t ) )) )
         goto error;
 
     /* Fill all fields */



More information about the vlc-commits mailing list