projects
/
platform
/
core
/
security
/
security-manager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50971af
)
Fix potential memory leak
57/317557/1
author
Krzysztof Malysa
<k.malysa@samsung.com>
Wed, 11 Sep 2024 15:51:32 +0000
(17:51 +0200)
committer
Krzysztof Malysa
<k.malysa@samsung.com>
Wed, 11 Sep 2024 16:02:56 +0000
(18:02 +0200)
Change-Id: I6a14537d3e510046b37603aa99e75f8f96b3a845
src/common/cynara.cpp
patch
|
blob
|
history
diff --git
a/src/common/cynara.cpp
b/src/common/cynara.cpp
index 89ef21feaab591c17ca10bc3927f7f5e398a1e8f..24820c75b769cd632b7d11b5749d82dac67bf612 100644
(file)
--- a/
src/common/cynara.cpp
+++ b/
src/common/cynara.cpp
@@
-857,8
+857,13
@@
void CynaraAdmin::check(const std::string &label, const std::string &user, const
if (resultExtraCstr == nullptr)
resultExtra = "";
else {
- resultExtra = std::string(resultExtraCstr);
- free(resultExtraCstr);
+ try {
+ resultExtra = std::string(resultExtraCstr);
+ free(resultExtraCstr);
+ } catch (...) {
+ free(resultExtraCstr);
+ throw;
+ }
}
}