From 5f311d08ef77b809a6319caab1a83a932af2bc63 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 25 Aug 2011 19:21:09 +0000 Subject: Fix bug #3398114: only unref filename_value if we successfully obtained it svn path=/trunk/netsurf/; revision=12670 --- desktop/download.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'desktop') diff --git a/desktop/download.c b/desktop/download.c index 71aa55e67..b0ca700d0 100644 --- a/desktop/download.c +++ b/desktop/download.c @@ -132,12 +132,13 @@ static nserror download_context_process_headers(download_context *ctx) error = http_parameter_list_find_item(disposition->parameters, filename, &filename_value); - if (error == NSERROR_OK) + if (error == NSERROR_OK) { ctx->filename = download_parse_filename( lwc_string_data(filename_value)); + lwc_string_unref(filename_value); + } http_content_disposition_destroy(disposition); - lwc_string_unref(filename_value); lwc_string_unref(filename); } -- cgit v1.2.3