[vlc-commits] control: check calloc return value correctly

Matthew Whitworth git at videolan.org
Fri Mar 2 16:51:59 CET 2018


vlc | branch: master | Matthew Whitworth <mwhitworth at gmail.com> | Fri Mar  2 16:45:31 2018 +0100| [ee5461277659ab143e6f20a581a3f00c752164ac] | committer: Hugo Beauzée-Luyssen

control: check calloc return value correctly

Incorrect check after calloc returns.

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

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

diff --git a/src/input/control.c b/src/input/control.c
index 75a2f64355..2b2f7108f1 100644
--- a/src/input/control.c
+++ b/src/input/control.c
@@ -392,7 +392,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
             }
 
             *array = calloc( p_title->i_seekpoint, sizeof(**array) );
-            if( unlikely(array == NULL) )
+            if( unlikely(*array == NULL) )
             {
                 vlc_mutex_unlock( &priv->p_item->lock );
                 return VLC_ENOMEM;



More information about the vlc-commits mailing list