projects
/
platform
/
core
/
api
/
maps-service.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9d09ab
)
Coverity Issue fix
12/282412/1
author
Abhimanyu Swami
<abhimanyu1.s@samsung.com>
Mon, 3 Oct 2022 08:19:46 +0000
(13:49 +0530)
committer
Abhimanyu Swami
<abhimanyu1.s@samsung.com>
Mon, 3 Oct 2022 08:19:46 +0000
(13:49 +0530)
Change-Id: Ic7b6fc95b144fd786b863a0d4e4c26c236bd8547
Signed-off-by: Abhimanyu Swami <abhimanyu1.s@samsung.com>
src/plugin/discovery.cpp
patch
|
blob
|
history
diff --git
a/src/plugin/discovery.cpp
b/src/plugin/discovery.cpp
index e472b9432f25cf2458b32880b68fefd93695f9f8..c3eb2db86f36695eeabffd984ae8e78b1bb3a3cc 100644
(file)
--- a/
src/plugin/discovery.cpp
+++ b/
src/plugin/discovery.cpp
@@
-140,7
+140,8
@@
void plugin::split_provider_name(const char *original, char **provider, char **m
{
char *save = NULL, *_provider = NULL, *_module = NULL;
- _provider = strtok_r(g_strdup(original), "/", &save);
+ char *_original = g_strdup(original);
+ _provider = strtok_r(_original, "/", &save);
_module = g_strdup(strtok_r(NULL, "", &save));
if (provider)
@@
-148,6
+149,7
@@
void plugin::split_provider_name(const char *original, char **provider, char **m
if (module)
*module = g_strdup(_module);
+ g_free(_original);
g_free(_provider);
g_free(_module);
}