From c17dbd14639fce562b01986fbf1e739020994bd3 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Sun, 1 Mar 2015 13:03:20 +0530 Subject: [PATCH 3/4] html-url.c: Fix potential memory leaks Reported by: Coverity Bug 1188050 --- src/html-url.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/html-url.c b/src/html-url.c index 07c29bb..4fbcadf 100644 --- a/src/html-url.c +++ b/src/html-url.c @@ -303,6 +303,7 @@ append_url (const char *link_uri, int position, int size, logprintf (LOG_NOTQUIET, _("%s: Cannot resolve incomplete link %s.\n"), ctx->document_file, link_uri); + iri_free (iri); return NULL; } @@ -311,6 +312,7 @@ append_url (const char *link_uri, int position, int size, { DEBUGP (("%s: link \"%s\" doesn't parse.\n", ctx->document_file, link_uri)); + iri_free (iri); return NULL; } } @@ -334,6 +336,7 @@ append_url (const char *link_uri, int position, int size, DEBUGP (("%s: merged link \"%s\" doesn't parse.\n", ctx->document_file, complete_uri)); xfree (complete_uri); + iri_free (iri); return NULL; } xfree (complete_uri); -- 2.3.1