[vlc-devel] [RFC 30/38] audio_filter/audibargraph_a: replaced usage of xmalloc

Filip Roséen filip at videolabs.io
Mon Jun 27 13:43:41 CEST 2016


---
 modules/audio_filter/audiobargraph_a.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/audio_filter/audiobargraph_a.c b/modules/audio_filter/audiobargraph_a.c
index d1f5051..4d3e6c9 100644
--- a/modules/audio_filter/audiobargraph_a.c
+++ b/modules/audio_filter/audiobargraph_a.c
@@ -189,7 +189,11 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
 
     if (p_sys->silence) {
         /* 2 - store the new value */
-        ValueDate_t *new = xmalloc(sizeof(*new));
+        ValueDate_t *new = malloc(sizeof(*new));
+
+        if( unlikely( !new ) )
+            return NULL;
+
         new->value = max;
         new->date = p_in_buf->i_pts;
         new->next = NULL;
-- 
2.9.0



More information about the vlc-devel mailing list