[vlc-commits] rss: use vlc_alloc helper

Thomas Guillem git at videolan.org
Sat Nov 11 19:00:21 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:49:28 2017 +0100| [c48c48ea7be134958450832eb537ca1879725e6d] | committer: Thomas Guillem

rss: use vlc_alloc helper

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c48c48ea7be134958450832eb537ca1879725e6d
---

 modules/spu/rss.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/spu/rss.c b/modules/spu/rss.c
index 751bba8889..8fbefd05ff 100644
--- a/modules/spu/rss.c
+++ b/modules/spu/rss.c
@@ -642,7 +642,7 @@ static int ParseUrls( filter_t *p_filter, char *psz_urls )
     }
 
     /* Allocate the structure */
-    p_sys->p_feeds = malloc( p_sys->i_feeds * sizeof( rss_feed_t ) );
+    p_sys->p_feeds = vlc_alloc( p_sys->i_feeds, sizeof( rss_feed_t ) );
     if( !p_sys->p_feeds )
         return VLC_ENOMEM;
 
@@ -896,7 +896,7 @@ static rss_feed_t* FetchRSS( filter_t *p_filter )
     bool b_images = p_sys->b_images;
 
     /* Allocate a new structure */
-    rss_feed_t *p_feeds = malloc( i_feeds * sizeof( rss_feed_t ) );
+    rss_feed_t *p_feeds = vlc_alloc( i_feeds, sizeof( rss_feed_t ) );
     if( !p_feeds )
         return NULL;
 



More information about the vlc-commits mailing list