aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/window-commands.c7
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: