diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-01-29 19:42:33 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-01-29 19:42:33 +0800 |
commit | 76c5a174fef9a2f3a46c7476a21bd202e521c36b (patch) | |
tree | 507f480245ca6b98170f03e00ed8cac826a2ba46 /embed | |
parent | 7c19c50e52e288159d58a4894a439e6a1fb80b72 (diff) | |
download | gsoc2013-epiphany-76c5a174fef9a2f3a46c7476a21bd202e521c36b.tar.gz gsoc2013-epiphany-76c5a174fef9a2f3a46c7476a21bd202e521c36b.tar.zst gsoc2013-epiphany-76c5a174fef9a2f3a46c7476a21bd202e521c36b.zip |
Fix mem leak.
2004-01-29 Christian Persch <chpe@cvs.gnome.org>
* embed/downloader-view.c: (update_download_row):
Fix mem leak.
Diffstat (limited to 'embed')
-rw-r--r-- | embed/downloader-view.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/embed/downloader-view.c b/embed/downloader-view.c index 1a04f97a4..96e27bb2c 100644 --- a/embed/downloader-view.c +++ b/embed/downloader-view.c @@ -249,7 +249,7 @@ update_download_row (DownloaderView *dv, EphyDownload *download) GtkTreeIter iter; EphyDownloadState state; long total, current, remaining_secs; - char *remaining, *file, *cur_progress; + char *remaining, *file, *cur_progress, *name; struct tm; int percent; @@ -283,22 +283,20 @@ update_download_row (DownloaderView *dv, EphyDownload *download) cur_progress = gnome_vfs_format_file_size_for_display (current); + name = ephy_download_get_name (download); + if (total != -1) { - char *total_progress, *name; + char *total_progress; - name = ephy_download_get_name (download); total_progress = gnome_vfs_format_file_size_for_display (total); file = g_strdup_printf ("%s\n%s of %s", name, cur_progress, total_progress); - g_free (name); g_free (total_progress); } else { - file = g_strdup_printf ("%s\n%s", - ephy_download_get_name (download), - cur_progress); + file = g_strdup_printf ("%s\n%s", name, cur_progress); } if (remaining_secs < 0) @@ -320,6 +318,7 @@ update_download_row (DownloaderView *dv, EphyDownload *download) -1); gtk_tree_path_free (path); + g_free (name); g_free (cur_progress); g_free (file); g_free (remaining); |