Bug 28144 - Memory leak in error handling code for SOUP interface
Summary: Memory leak in error handling code for SOUP interface
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-10 06:06 PDT by John Kjellberg
Modified: 2009-08-10 11:26 PDT (History)
1 user (show)

See Also:


Attachments
Added "g_free" after calls to "soup_uri_to_string" and "g_file_get_uri" where they where missing. (4.58 KB, patch)
2009-08-10 06:16 PDT, John Kjellberg
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Kjellberg 2009-08-10 06:06:08 PDT
When reviewing the code I believe I have found parts in the error handling code where "g_free" is missing. See attached patch for details.
Comment 1 John Kjellberg 2009-08-10 06:16:48 PDT
Created attachment 34449 [details]
Added "g_free" after calls to "soup_uri_to_string" and "g_file_get_uri" where they where missing.
Comment 2 John Kjellberg 2009-08-10 06:19:11 PDT
I'm sorry if I have misunderstood the code. I'm new to WebKit, SOUP and glib. Please give me some short input if I have missed something regarding the resource handling. Thanks.
Comment 3 Darin Adler 2009-08-10 10:19:24 PDT
Comment on attachment 34449 [details]
Added "g_free" after calls to "soup_uri_to_string" and "g_file_get_uri" where they where missing.

> +        char *uri=soup_uri_to_string(soup_message_get_uri(msg), false);

Formatting is wrong here. It should be "char* uri = soup…"

Otherwise, this patch looks great. I'm going to say r=me
Comment 4 Jan Alonzo 2009-08-10 11:26:52 PDT
(In reply to comment #3)
> (From update of attachment 34449 [details])
> > +        char *uri=soup_uri_to_string(soup_message_get_uri(msg), false);
> 
> Formatting is wrong here. It should be "char* uri = soup…"
> 
> Otherwise, this patch looks great. I'm going to say r=me

Thanks. Landed as http://trac.webkit.org/changeset/46989.