From efb7cf5b060afd155f288f0f2fea79615a71c339 Mon Sep 17 00:00:00 2001 From: Jaeyun Jung Date: Mon, 17 Jun 2024 13:58:14 +0900 Subject: [PATCH] [Filter/DeepViewRT] mem leak case Fix mem leak case when loading mapped model file, use member variable. Signed-off-by: Jaeyun Jung --- ext/nnstreamer/tensor_filter/tensor_filter_deepview_rt.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/nnstreamer/tensor_filter/tensor_filter_deepview_rt.cc b/ext/nnstreamer/tensor_filter/tensor_filter_deepview_rt.cc index b1a58d9..111ebc7 100644 --- a/ext/nnstreamer/tensor_filter/tensor_filter_deepview_rt.cc +++ b/ext/nnstreamer/tensor_filter/tensor_filter_deepview_rt.cc @@ -400,7 +400,7 @@ dvrt_subplugin::initContext (dvrt_options_s *options) if (!options->modelPath) return -ENOENT; - GMappedFile *modelMap = g_mapped_file_new (options->modelPath, FALSE, &err); + modelMap = g_mapped_file_new (options->modelPath, FALSE, &err); if (!modelMap || err) { nns_logw ("Could not map model file %s %s", options->modelPath, err->message); g_clear_error (&err); -- 2.7.4