[vlc-devel] commit: Fix memleak (CID 202, 203, 204 and 205) ( Rémi Duraffort )
git version control
git at videolan.org
Sun Oct 5 19:13:43 CEST 2008
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Oct 5 19:12:31 2008 +0200| [cdc6a08d4c761e783ac2ff71ccd45a2f1a028416] | committer: Rémi Duraffort
Fix memleak (CID 202, 203, 204 and 205)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cdc6a08d4c761e783ac2ff71ccd45a2f1a028416
---
modules/access/dvb/en50221.c | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/modules/access/dvb/en50221.c b/modules/access/dvb/en50221.c
index 3bc9573..cf5a26a 100644
--- a/modules/access/dvb/en50221.c
+++ b/modules/access/dvb/en50221.c
@@ -1204,8 +1204,11 @@ static void CAPMTFirst( access_t * p_access, int i_session_id,
0x3 /* only */, 0x1 /* ok_descrambling */,
&i_capmt_size );
- if ( i_capmt_size )
+ if( i_capmt_size )
+ {
APDUSend( p_access, i_session_id, AOT_CA_PMT, p_capmt, i_capmt_size );
+ free( p_capmt );
+ }
}
/*****************************************************************************
@@ -1238,8 +1241,11 @@ static void CAPMTAdd( access_t * p_access, int i_session_id,
0x4 /* add */, 0x1 /* ok_descrambling */,
&i_capmt_size );
- if ( i_capmt_size )
+ if( i_capmt_size )
+ {
APDUSend( p_access, i_session_id, AOT_CA_PMT, p_capmt, i_capmt_size );
+ free( p_capmt );
+ }
}
/*****************************************************************************
@@ -1258,8 +1264,11 @@ static void CAPMTUpdate( access_t * p_access, int i_session_id,
0x5 /* update */, 0x1 /* ok_descrambling */,
&i_capmt_size );
- if ( i_capmt_size )
+ if( i_capmt_size )
+ {
APDUSend( p_access, i_session_id, AOT_CA_PMT, p_capmt, i_capmt_size );
+ free( p_capmt );
+ }
}
/*****************************************************************************
@@ -1279,8 +1288,11 @@ static void CAPMTDelete( access_t * p_access, int i_session_id,
0x5 /* update */, 0x4 /* not selected */,
&i_capmt_size );
- if ( i_capmt_size )
+ if( i_capmt_size )
+ {
APDUSend( p_access, i_session_id, AOT_CA_PMT, p_capmt, i_capmt_size );
+ free( p_capmt );
+ }
}
/*****************************************************************************
More information about the vlc-devel
mailing list