[gupnp-tools] universal-cp: Do not leave value uninitialized



commit 7bbce67e15eac86c23f3e2a2ca07f74f0b91427a
Author: Jens Georg <mail jensge org>
Date:   Wed May 25 09:51:14 2022 +0200

    universal-cp: Do not leave value uninitialized

 src/universal-cp/action-dialog.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/universal-cp/action-dialog.c b/src/universal-cp/action-dialog.c
index 272cae4..dd5b271 100644
--- a/src/universal-cp/action-dialog.c
+++ b/src/universal-cp/action-dialog.c
@@ -421,8 +421,10 @@ get_action_arg_widget_info (GtkWidget                 *arg_widget,
                                         introspection,
                                         arg_info->related_state_variable);
 
-        if (arg_info->direction == GUPNP_SERVICE_ACTION_ARG_DIRECTION_OUT)
+        if (arg_info->direction == GUPNP_SERVICE_ACTION_ARG_DIRECTION_OUT) {
+                *value = NULL;
                 return arg_info->name;
+        }
 
         *value = g_slice_alloc0 (sizeof (GValue));
         g_value_init (*value, variable_info->type);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]