[PATCH] dr_81: allocate p_decoded with calloc rather than malloc

Michael Krufky <[email protected]>
Newsgroups gmane.comp.video.videolan.libdvbpsi.devel
Message-ID <20140204231913.6088d3a5@vujade>
Jean-Paul,

Please disregard my previous patch... This one is a better cleanup:


The following changes since commit 6ab64fb30a0daa3a042d71abb6addd110d6e441a:

  ATSC MGT: make sure all members are initialized. (2014-02-04 11:20:45 +0100)

are available in the git repository at:

  https://github.com/mkrufky/libdvbpsi.git for_upstream

for you to fetch changes up to eb1c3944f4b658065c79c8a5c422e97f5c52c473:

  dr_81: allocate p_decoded with calloc rather than malloc (2014-02-04 22:10:38 -0500)


Michael Krufky (1):
      dr_81: allocate p_decoded with calloc rather than malloc

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



commit eb1c3944f4b658065c79c8a5c422e97f5c52c473
Author: Michael Krufky <[email protected]>
Date:   Wed Dec 25 22:41:49 2013 -0500

    dr_81: allocate p_decoded with calloc rather than malloc
    
    Signed-off-by: Michael Krufky <[email protected]>

diff --git a/src/descriptors/dr_81.c b/src/descriptors/dr_81.c
index ca41c3d..263a483 100644
--- a/src/descriptors/dr_81.c
+++ b/src/descriptors/dr_81.c
@@ -59,7 +59,7 @@ dvbpsi_ac3_audio_dr_t *dvbpsi_DecodeAc3AudioDr(dvbpsi_descriptor_t *p_descriptor
     if (p_descriptor->i_length < 3)
         return NULL;
 
-    p_decoded = (dvbpsi_ac3_audio_dr_t*)malloc(sizeof(dvbpsi_ac3_audio_dr_t));
+    p_decoded = (dvbpsi_ac3_audio_dr_t*)calloc(1, sizeof(dvbpsi_ac3_audio_dr_t));
     if (!p_decoded)
         return NULL;
 
_______________________________________________
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.