diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2014-11-15 10:13:54 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2014-11-15 10:13:54 +0000 |
commit | 89b61e8483cac27ea23c840d7a68c5243de97421 (patch) | |
tree | 7d4d374090ad7ffa74b25f76597b3ab1dcb2ad3d /src/html | |
parent | 0873c0f0b1e4ef9c276d88502f5b0de546c01619 (diff) | |
download | libdom-89b61e8483cac27ea23c840d7a68c5243de97421.tar.gz libdom-89b61e8483cac27ea23c840d7a68c5243de97421.tar.bz2 |
Fix unref issue with html collection in applets callback. Coverity #1227072
Diffstat (limited to 'src/html')
-rw-r--r-- | src/html/html_document.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/html/html_document.c b/src/html/html_document.c index f6808e7..ac0469c 100644 --- a/src/html/html_document.c +++ b/src/html/html_document.c @@ -757,10 +757,11 @@ bool applets_callback(struct dom_node_internal *node, void *ctx) ((dom_html_document *)ctx)->memoised[hds_OBJECT])) { uint32_t len = 0; dom_html_collection *applets; - _dom_html_collection_create(ctx, node, - applet_callback, ctx, &applets); - + if (_dom_html_collection_create(ctx, node, + applet_callback, ctx, &applets) != DOM_NO_ERR) + return false; dom_html_collection_get_length(applets, &len); + dom_html_collection_unref(applets); if(len != 0) return true; } |