diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2012-06-15 01:35:58 +0800 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2012-06-15 01:41:17 +0800 |
commit | 9954541fdc25579033d396554717b4e4c30c8cfb (patch) | |
tree | 435fba1af7e7bf5f07a1126b5eb954867aa8fb85 /src/window-commands.c | |
parent | c222791900a8fac54bf5e76a19639f893fdafd1c (diff) | |
download | gsoc2013-epiphany-9954541fdc25579033d396554717b4e4c30c8cfb.tar.gz gsoc2013-epiphany-9954541fdc25579033d396554717b4e4c30c8cfb.tar.zst gsoc2013-epiphany-9954541fdc25579033d396554717b4e4c30c8cfb.zip |
Fix memory leak
Diffstat (limited to 'src/window-commands.c')
-rw-r--r-- | src/window-commands.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/window-commands.c b/src/window-commands.c index 535745741..98364d712 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -370,14 +370,15 @@ download_status_changed_cb (WebKitDownload *download, EphyApplicationDialogData *data) { WebKitDownloadStatus status = webkit_download_get_status (download); - const char *destination; + char *filename; switch (status) { case WEBKIT_DOWNLOAD_STATUS_FINISHED: - destination = g_filename_from_uri (webkit_download_get_destination_uri (download), + filename = g_filename_from_uri (webkit_download_get_destination_uri (download), NULL, NULL); - gtk_image_set_from_file (GTK_IMAGE (data->image), destination); + gtk_image_set_from_file (GTK_IMAGE (data->image), filename); + g_free (filename); break; case WEBKIT_DOWNLOAD_STATUS_ERROR: case WEBKIT_DOWNLOAD_STATUS_CANCELLED: |