projects
/
platform
/
core
/
graphics
/
tizenvg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bd34f0
)
common: ++exception handling.
author
Hermet Park
<chuneon.park@samsung.com>
Fri, 5 Nov 2021 12:04:51 +0000
(21:04 +0900)
committer
JunsuChoi
<jsuya.choi@samsung.com>
Wed, 10 Nov 2021 01:43:08 +0000
(10:43 +0900)
fix the memory leak in the corner case
detected by tvg test suites
@Issue: https://github.com/Samsung/thorvg/issues/995
src/lib/tvgSaver.cpp
patch
|
blob
|
history
diff --git
a/src/lib/tvgSaver.cpp
b/src/lib/tvgSaver.cpp
index
ffa2bf1
..
dc240d0
100644
(file)
--- a/
src/lib/tvgSaver.cpp
+++ b/
src/lib/tvgSaver.cpp
@@
-110,9
+110,12
@@
Result Saver::save(std::unique_ptr<Paint> paint, const string& path, bool compre
pImpl->saveModule = saveModule;
return Result::Success;
} else {
+ delete(p);
+ delete(saveModule);
return Result::Unknown;
}
}
+ delete(p);
return Result::NonSupport;
}