ATSC MGT: make sure all members are initialized.

[email protected] (Jean-Paul Saman)
Newsgroups gmane.comp.video.videolan.libdvbpsi.devel
Message-ID <[email protected]>
libdvbpsi | branch: master | Jean-Paul Saman <[email protected]> | Tue Feb  4 11:20:45 2014 +0100| [6ab64fb30a0daa3a042d71abb6addd110d6e441a] | committer: Jean-Paul Saman

ATSC MGT: make sure all members are initialized.

> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=6ab64fb30a0daa3a042d71abb6addd110d6e441a
---

 src/tables/atsc_mgt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tables/atsc_mgt.c b/src/tables/atsc_mgt.c
index ef0eb20..3537274 100644
--- a/src/tables/atsc_mgt.c
+++ b/src/tables/atsc_mgt.c
@@ -186,7 +186,7 @@ dvbpsi_atsc_mgt_t *dvbpsi_atsc_NewMGT(uint8_t i_table_id, uint16_t i_extension,
                                       uint8_t i_version, uint8_t i_protocol, bool b_current_next)
 {
     dvbpsi_atsc_mgt_t* p_mgt;
-    p_mgt = (dvbpsi_atsc_mgt_t*)malloc(sizeof(dvbpsi_atsc_mgt_t));
+    p_mgt = (dvbpsi_atsc_mgt_t*)calloc(1, sizeof(dvbpsi_atsc_mgt_t));
     if (p_mgt != NULL)
         dvbpsi_atsc_InitMGT(p_mgt, i_table_id, i_extension, i_version, i_protocol, b_current_next);
     return p_mgt;

_______________________________________________
libdvbpsi-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvbpsi-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.