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:
15aaa62
)
tvg_saver: +exception handling
author
Hermet Park
<chuneon.park@samsung.com>
Mon, 26 Jul 2021 07:17:06 +0000
(16:17 +0900)
committer
Hermet Park
<chuneon.park@samsung.com>
Mon, 26 Jul 2021 07:19:58 +0000
(16:19 +0900)
close the file handle before returning the function.
Change-Id: I9da706184669a42ad1ef27747b3909aa0462ab32
src/savers/tvg/tvgTvgSaver.cpp
patch
|
blob
|
history
diff --git
a/src/savers/tvg/tvgTvgSaver.cpp
b/src/savers/tvg/tvgTvgSaver.cpp
index
0ebb7e8
..
ddf8f16
100644
(file)
--- a/
src/savers/tvg/tvgTvgSaver.cpp
+++ b/
src/savers/tvg/tvgTvgSaver.cpp
@@
-42,7
+42,10
@@
bool TvgSaver::flushTo(const std::string& path)
FILE* fp = fopen(path.c_str(), "w+");
if (!fp) return false;
- if (fwrite(buffer.data, sizeof(char), buffer.count, fp) == 0) return false;
+ if (fwrite(buffer.data, sizeof(char), buffer.count, fp) == 0) {
+ fclose(fp);
+ return false;
+ }
fclose(fp);