[Filter/DeepViewRT] mem leak case
authorJaeyun Jung <jy1210.jung@samsung.com>
Mon, 17 Jun 2024 04:58:14 +0000 (13:58 +0900)
committerSangjung Woo <again4you@gmail.com>
Thu, 11 Jul 2024 09:30:38 +0000 (18:30 +0900)
Fix mem leak case when loading mapped model file, use member variable.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
ext/nnstreamer/tensor_filter/tensor_filter_deepview_rt.cc

index b1a58d9..111ebc7 100644 (file)
@@ -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);