diff options
| author | Mikael Magnusson <mikachu@gmail.com> | 2014-10-28 05:20:10 +0100 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@gmail.com> | 2014-10-28 05:42:28 +0100 |
| commit | 122e2a81d3899f918de81a735061776193ddeed8 (patch) | |
| tree | 8c40c2fbcce57451ac16bd794dd82b7ec3fc140c /obt/xml.c | |
| parent | 1491e196f3d05152fab127eb9cff3146a68a20a8 (diff) | |
Some fixes found by coverity for things used before a null check
In the second case, we actually check the wrong variable.
Diffstat (limited to 'obt/xml.c')
| -rw-r--r-- | obt/xml.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -281,7 +281,7 @@ gboolean obt_xml_load_mem(ObtXmlInst *i, xmlResetLastError(); i->doc = xmlParseMemory(data, len); - if (i) { + if (i->doc) { i->root = xmlDocGetRootElement(i->doc); if (!i->root) { xmlFreeDoc(i->doc); |
