diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2011-08-25 19:21:09 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2011-08-25 19:21:09 +0000 |
commit | 5f311d08ef77b809a6319caab1a83a932af2bc63 (patch) | |
tree | f5adf65c85f04d3fafc84487fc8302c7e3c59fbb /desktop/download.c | |
parent | 0794f8c4dd00b9ca99e1a6a6db29067f619fc9dc (diff) | |
download | netsurf-5f311d08ef77b809a6319caab1a83a932af2bc63.tar.gz netsurf-5f311d08ef77b809a6319caab1a83a932af2bc63.tar.bz2 |
Fix bug #3398114: only unref filename_value if we successfully obtained it
svn path=/trunk/netsurf/; revision=12670
Diffstat (limited to 'desktop/download.c')
-rw-r--r-- | desktop/download.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); } |