aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/fs/download.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/fs/download.c')
-rw-r--r--src/plugins/fs/download.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c
index 7f243a3c..bdae8406 100644
--- a/src/plugins/fs/download.c
+++ b/src/plugins/fs/download.c
@@ -409,10 +409,11 @@ check_pending(const char * filename,
409 -1); 409 -1);
410 if ( (name != NULL) && 410 if ( (name != NULL) &&
411 (0 == strcmp(name, filename)) ) { 411 (0 == strcmp(name, filename)) ) {
412 FREE(name); 412 free(name);
413 return SYSERR; 413 return SYSERR;
414 } 414 }
415 FREENONNULL(name); 415 if (name != NULL)
416 free(name);
416 if (SYSERR == check_pending(filename, 417 if (SYSERR == check_pending(filename,
417 &iter)) 418 &iter))
418 return SYSERR; 419 return SYSERR;
@@ -533,7 +534,7 @@ initiateDownload(GtkTreeModel * model,
533 dirPath[0] = '\0'; 534 dirPath[0] = '\0';
534 dirPathLen = 0; 535 dirPathLen = 0;
535 while (gtk_tree_path_get_depth(dirTreePath) > 1) { 536 while (gtk_tree_path_get_depth(dirTreePath) > 1) {
536 const char * dirname; 537 char * dirname;
537 char * new; 538 char * new;
538 539
539 if (! gtk_tree_path_up(dirTreePath)) 540 if (! gtk_tree_path_up(dirTreePath))
@@ -555,6 +556,7 @@ initiateDownload(GtkTreeModel * model,
555 strcat(new, dirPath); 556 strcat(new, dirPath);
556 FREE(dirPath); 557 FREE(dirPath);
557 dirPath = new; 558 dirPath = new;
559 free(dirname);
558 } 560 }
559 gtk_tree_path_free(dirTreePath); 561 gtk_tree_path_free(dirTreePath);
560 562
@@ -733,7 +735,7 @@ clearCompletedDownloadCallback(GtkTreeModel * model,
733 735
734void on_clearCompletedDownloadsButton_clicked_fs(void * unused, 736void on_clearCompletedDownloadsButton_clicked_fs(void * unused,
735 GtkWidget * clearButton) { 737 GtkWidget * clearButton) {
736 gtk_tree_model_foreach(GTK_TREE_MODEL(download_summary), 738 ggc_tree_model_foreach(GTK_TREE_MODEL(download_summary),
737 &clearCompletedDownloadCallback, 739 &clearCompletedDownloadCallback,
738 NULL); 740 NULL);
739} 741}