html-url.c: Fix potential memory leaks

Reported by: Coverity Bug 1188050
This commit is contained in:
Darshit Shah 2015-03-01 13:03:20 +05:30
parent 7d5a7ef9ca
commit 53b22974cb
1 changed files with 3 additions and 0 deletions

View File

@ -304,6 +304,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;
}
@ -312,6 +313,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;
}
}
@ -335,6 +337,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);