From: Jaeyun Jung Date: Wed, 12 Feb 2025 10:16:11 +0000 (+0900) Subject: [CodeClean] fix svace issue X-Git-Tag: accepted/tizen/unified/x/20250311.211303^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fmain;p=platform%2Fcore%2Fml%2Fmlops-agent.git [CodeClean] fix svace issue Fix svace issue, node id value with lock. Signed-off-by: Jaeyun Jung --- 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; }