diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2006-03-09 16:49:24 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2006-03-09 16:49:24 +0000 |
commit | 2728f845c5581af9213057ace8b3f664d64c15a9 (patch) | |
tree | 75cdec6cdad29e0c09b9db722a44ec523c3419c5 /example | |
parent | 30e7607b7a346695691cd819361b3c11e8d11d00 (diff) | |
download | android_external_libxml2-2728f845c5581af9213057ace8b3f664d64c15a9.tar.gz android_external_libxml2-2728f845c5581af9213057ace8b3f664d64c15a9.tar.bz2 android_external_libxml2-2728f845c5581af9213057ace8b3f664d64c15a9.zip |
more cleanups based on coverity reports. Daniel
* SAX2.c catalog.c encoding.c entities.c example/gjobread.c
python/libxml.c: more cleanups based on coverity reports.
Daniel
Diffstat (limited to 'example')
-rw-r--r-- | example/gjobread.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/example/gjobread.c b/example/gjobread.c index b192bf4f..d3f6d57d 100644 --- a/example/gjobread.c +++ b/example/gjobread.c @@ -237,12 +237,14 @@ parseGjobFile(char *filename) { */ /* First level we expect just Jobs */ cur = cur->xmlChildrenNode; - while ( cur && xmlIsBlankNode ( cur ) ) - { + while ( cur && xmlIsBlankNode ( cur ) ) { cur = cur -> next; - } - if ( cur == 0 ) - return ( NULL ); + } + if ( cur == 0 ) { + xmlFreeDoc(doc); + free(ret); + return ( NULL ); + } if ((xmlStrcmp(cur->name, (const xmlChar *) "Jobs")) || (cur->ns != ns)) { fprintf(stderr,"document of the wrong type, was '%s', Jobs expected", cur->name); |