diff options
author | Riccardo Magliocchetti <riccardo@datahost.it> | 2008-11-10 19:20:52 +0100 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2008-11-20 11:15:55 +0100 |
commit | f13dd37ca4cbf1bc5b80fa2fe215be1bf743d164 (patch) | |
tree | 758677b94e6324caee22e209bedfaee2f65e5c78 | |
parent | 5195c41ab749afc8bdfaf1f2603281f23fc6a5d7 (diff) |
zero memory when using it in PA
-rw-r--r-- | swfdec-gtk/swfdec_playback_pulse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/swfdec-gtk/swfdec_playback_pulse.c b/swfdec-gtk/swfdec_playback_pulse.c index 5aa85f07..e8840054 100644 --- a/swfdec-gtk/swfdec_playback_pulse.c +++ b/swfdec-gtk/swfdec_playback_pulse.c @@ -74,7 +74,7 @@ stream_write_callback (pa_stream *pa, /* Adjust to our rounded-down number */ bytes = samples * SAMPLESIZE * CHANNELS; - frag = malloc (bytes); + frag = g_try_malloc0 (bytes); if (frag == NULL) { g_printerr ("Failed to allocate fragment of size %d\n", (int)bytes); return; @@ -96,7 +96,7 @@ stream_write_callback (pa_stream *pa, /* Advance playback pointer */ stream->offset += samples; - free(frag); + g_free (frag); } static void |