[vlc-commits] dbus: Add missing error check

Hugo Beauzée-Luyssen git at videolan.org
Fri Nov 24 16:28:51 CET 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Nov 24 15:04:18 2017 +0100| [75de9dccf5815574e5a6b55777ac2b9d4512ea94] | committer: Hugo Beauzée-Luyssen

dbus: Add missing error check

CID #1211816

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

 modules/control/dbus/dbus_root.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/modules/control/dbus/dbus_root.c b/modules/control/dbus/dbus_root.c
index d663bc18cf..9ff59ba4e1 100644
--- a/modules/control/dbus/dbus_root.c
+++ b/modules/control/dbus/dbus_root.c
@@ -466,8 +466,14 @@ PropertiesChangedSignal( intf_thread_t    *p_intf,
         return DBUS_HANDLER_RESULT_NEED_MEMORY;
 
     if( vlc_dictionary_has_key( p_changed_properties, "Fullscreen" ) )
-        AddProperty( p_intf, &changed_properties, "Fullscreen", "b",
-                     MarshalFullscreen );
+    {
+        if( AddProperty( p_intf, &changed_properties, "Fullscreen", "b",
+                     MarshalFullscreen ) != VLC_SUCCESS )
+        {
+            dbus_message_iter_abandon_container( &args, &changed_properties );
+            return DBUS_HANDLER_RESULT_NEED_MEMORY;
+        }
+    }
 
     if( !dbus_message_iter_close_container( &args, &changed_properties ) )
         return DBUS_HANDLER_RESULT_NEED_MEMORY;



More information about the vlc-commits mailing list