Fix memory leak 15/319115/1 accepted/tizen_unified accepted/tizen_unified_x accepted/tizen_unified_x_asan tizen accepted/tizen/unified/20250207.071328 accepted/tizen/unified/x/20250212.043738 accepted/tizen/unified/x/asan/20250211.003248
authorchaehee.hong <chaehee.hong@samsung.com>
Tue, 4 Feb 2025 10:23:29 +0000 (19:23 +0900)
committerchaehee.hong <chaehee.hong@samsung.com>
Tue, 4 Feb 2025 10:23:39 +0000 (19:23 +0900)
Change-Id: I8d7ce54627454939435aabbf13539638739c211c

src/vine-data-path.cpp

index 795f4148fd5ea33f9f7d9637a27eafd904d51edc..41e0b25cf7ac16d1948b2003b718280823bd1cfa 100755 (executable)
@@ -822,6 +822,7 @@ int vine_data_path_open(vine_data_path_method_e method,
                ret = dp->plugin_fn->set_host_name(dp->plugin_handle, host_name);
                if (ret != VINE_DATA_PATH_ERROR_NONE) {
                        vine_data_path_destroy(dp);
+                       _destroy_security_info(&ssl);
                        return __convert_data_path_error_to_vine_error((vine_data_path_error)ret);
                }
        }
@@ -880,6 +881,7 @@ int vine_data_path_connect(vine_data_path_method_e method,
                ret = dp->plugin_fn->set_host_name(dp->plugin_handle, host_name);
                if (ret != VINE_DATA_PATH_ERROR_NONE) {
                        vine_data_path_destroy(dp);
+                       _destroy_security_info(&ssl);
                        return __convert_data_path_error_to_vine_error((vine_data_path_error)ret);
                }
        }