vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Thu Feb  7 
17:22:12 2019 +0100| [ac316d119fba17515643cea5235268d0bfe68732] | committer: 
Hugo Beauzée-Luyssen

input: Add missing allocation error check

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

 src/input/access.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/input/access.c b/src/input/access.c
index 481405bff0..b4f1531ff6 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -313,6 +313,12 @@ stream_t *stream_AccessNew(vlc_object_t *parent, 
input_thread_t *input,
 
         s->p_input_item = input ? input_GetItem(input) : NULL;
         s->psz_url = strdup(access->psz_url);
+        if (unlikely(s->psz_url == NULL))
+        {
+            vlc_object_release(s);
+            vlc_stream_Delete(access);
+            return NULL;
+        }
 
         if (access->pf_block != NULL)
             s->pf_block = AStreamReadBlock;

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to