[vlc-commits] dvb/scan: memory leak
Rémi Denis-Courmont
git at videolan.org
Tue Apr 22 23:03:53 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 23 00:03:38 2014 +0300| [b220b3f1dd251b63f41d99d1662dcb643f802de0] | committer: Rémi Denis-Courmont
dvb/scan: memory leak
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b220b3f1dd251b63f41d99d1662dcb643f802de0
---
modules/access/dvb/scan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/access/dvb/scan.c b/modules/access/dvb/scan.c
index d8a808c..d800979 100644
--- a/modules/access/dvb/scan.c
+++ b/modules/access/dvb/scan.c
@@ -851,8 +851,8 @@ static void NITCallBack( scan_session_t *p_session, dvbpsi_nit_t *p_nit )
uint32_t i_private_data_id = 0;
dvbpsi_descriptor_t *p_dsc;
- scan_configuration_t *p_cfg = malloc(sizeof(*p_cfg));
- if(!p_cfg) return;
+ scan_configuration_t cfg, *p_cfg = &cfg;
+
memset(p_cfg,0,sizeof(*p_cfg));
for( p_dsc = p_ts->p_first_descriptor; p_dsc != NULL; p_dsc = p_dsc->p_next )
{
More information about the vlc-commits
mailing list