From d24544f1c38ed48cbb93b70ff004e7178f0d269d Mon Sep 17 00:00:00 2001 From: Jaeyun Jung Date: Fri, 19 May 2023 14:15:18 +0900 Subject: [PATCH] [Common] condition to release extra info Remove unnecessary log-print, most pipelines does not have extra info and dont need releasing extra info. Signed-off-by: Jaeyun Jung --- gst/nnstreamer/nnstreamer_plugin_api_util_impl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gst/nnstreamer/nnstreamer_plugin_api_util_impl.c b/gst/nnstreamer/nnstreamer_plugin_api_util_impl.c index 614fc70..3cd1e41 100644 --- a/gst/nnstreamer/nnstreamer_plugin_api_util_impl.c +++ b/gst/nnstreamer/nnstreamer_plugin_api_util_impl.c @@ -368,14 +368,14 @@ gst_tensors_info_extra_free (GstTensorsInfo * info) guint i; g_return_if_fail (info != NULL); - g_return_if_fail (info->extra != NULL); - for (i = 0; i < NNS_TENSOR_SIZE_EXTRA_LIMIT; ++i) { - gst_tensor_info_free (&info->extra[i]); - } + if (info->extra) { + for (i = 0; i < NNS_TENSOR_SIZE_EXTRA_LIMIT; ++i) + gst_tensor_info_free (&info->extra[i]); - g_free (info->extra); - info->extra = NULL; + g_free (info->extra); + info->extra = NULL; + } } /** -- 2.7.4