From 6852685b9efc72b15f34ac4f618df0ef917e6c9c Mon Sep 17 00:00:00 2001 From: Jaeyun Jung Date: Wed, 12 Feb 2025 19:16:11 +0900 Subject: [PATCH] [CodeClean] fix svace issue Fix svace issue, node id value with lock. Signed-off-by: Jaeyun Jung --- daemon/mlops-agent-node.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon/mlops-agent-node.c b/daemon/mlops-agent-node.c index 4b3e97c..ad18fce 100755 --- a/daemon/mlops-agent-node.c +++ b/daemon/mlops-agent-node.c @@ -61,16 +61,18 @@ static int _mlops_node_set_pipeline_state (mlops_node_s * node, GstState state) { GstStateChangeReturn ret; + gint64 nid; g_return_val_if_fail (node != NULL, -EINVAL); g_mutex_lock (&node->lock); + nid = node->id; ret = gst_element_set_state (node->element, state); g_mutex_unlock (&node->lock); if (ret == GST_STATE_CHANGE_FAILURE) { ml_loge ("Failed to set the state of the pipeline to %s with ID %" - G_GINT64_FORMAT, gst_element_state_get_name (state), node->id); + G_GINT64_FORMAT, gst_element_state_get_name (state), nid); return -ESTRPIPE; } -- 2.34.1