projects
/
platform
/
core
/
appfw
/
launchpad.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
223c8ca
)
Fix static analysis issue
35/299035/1
author
Hwankyu Jhun
<h.jhun@samsung.com>
Mon, 18 Sep 2023 22:20:25 +0000
(07:20 +0900)
committer
Hwankyu Jhun
<h.jhun@samsung.com>
Mon, 18 Sep 2023 22:20:25 +0000
(07:20 +0900)
Checker:
- DEREF_OF_NULL.RET_STAT
Change-Id: Ifc95e098d24ccd2d80c83bee5f3340b4e13c5a66
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launchpad-parser/launchpad_parser_plugin.cc
patch
|
blob
|
history
diff --git
a/src/launchpad-parser/launchpad_parser_plugin.cc
b/src/launchpad-parser/launchpad_parser_plugin.cc
index
eacfbf2
..
575afd6
100644
(file)
--- a/
src/launchpad-parser/launchpad_parser_plugin.cc
+++ b/
src/launchpad-parser/launchpad_parser_plugin.cc
@@
-94,6
+94,9
@@
int LaunchpadParser::Install(xmlDocPtr doc, std::string pkgid) {
}
xmlNode* root = xmlDocGetRootElement(doc);
+ if (root == nullptr)
+ return -1;
+
for (xmlNode* node = root->children; node; node = node->next) {
if (!node->name)
continue;