aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/fs
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/fs')
-rw-r--r--src/plugins/fs/download.c10
-rw-r--r--src/plugins/fs/namespace.c39
-rw-r--r--src/plugins/fs/search.c6
3 files changed, 36 insertions, 19 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}
diff --git a/src/plugins/fs/namespace.c b/src/plugins/fs/namespace.c
index faf02567..47f55a0b 100644
--- a/src/plugins/fs/namespace.c
+++ b/src/plugins/fs/namespace.c
@@ -1031,9 +1031,12 @@ void on_namespaceUpdateButton_clicked_fs(GtkWidget * dummy1,
1031 GE_BREAK(ectx, 0); 1031 GE_BREAK(ectx, 0);
1032 UNREF(metaXML); 1032 UNREF(metaXML);
1033 metaXML = NULL; 1033 metaXML = NULL;
1034 FREENONNULL(last); 1034 if (last != NULL)
1035 FREENONNULL(next); 1035 free(last);
1036 FREENONNULL(freq); 1036 if (next != NULL)
1037 free(next);
1038 if (freq != NULL)
1039 free(freq);
1037 return; 1040 return;
1038 } 1041 }
1039 if (OK == enc2hash(last, 1042 if (OK == enc2hash(last,
@@ -1066,9 +1069,12 @@ void on_namespaceUpdateButton_clicked_fs(GtkWidget * dummy1,
1066 GE_BREAK(ectx, 0); 1069 GE_BREAK(ectx, 0);
1067 UNREF(metaXML); 1070 UNREF(metaXML);
1068 metaXML = NULL; 1071 metaXML = NULL;
1069 FREENONNULL(last); 1072 if (last != NULL)
1070 FREENONNULL(next); 1073 free(last);
1071 FREENONNULL(freq); 1074 if (next != NULL)
1075 free(next);
1076 if (freq != NULL)
1077 free(freq);
1072 return; 1078 return;
1073 } 1079 }
1074 hash2enc(&nextId, 1080 hash2enc(&nextId,
@@ -1148,9 +1154,12 @@ void on_namespaceUpdateButton_clicked_fs(GtkWidget * dummy1,
1148 gtk_widget_destroy(dialog); 1154 gtk_widget_destroy(dialog);
1149 UNREF(metaXML); 1155 UNREF(metaXML);
1150 metaXML = NULL; 1156 metaXML = NULL;
1151 FREENONNULL(last); 1157 if (last != NULL)
1152 FREENONNULL(next); 1158 free(last);
1153 FREENONNULL(freq); 1159 if (next != NULL)
1160 free(next);
1161 if (freq != NULL)
1162 free(freq);
1154 DEBUG_END(); 1163 DEBUG_END();
1155} 1164}
1156 1165
@@ -1248,8 +1257,10 @@ void on_namespaceRatingSpinButton_changed_fs(GtkWidget * dummy,
1248 gtk_widget_set_sensitive(spin, 1257 gtk_widget_set_sensitive(spin,
1249 FALSE); 1258 FALSE);
1250 } 1259 }
1251 FREENONNULL(description); 1260 if (description != NULL)
1252 FREENONNULL(encStr); 1261 free(description);
1262 if (encStr != NULL)
1263 free(encStr);
1253 DEBUG_END(); 1264 DEBUG_END();
1254} 1265}
1255 1266
@@ -1324,8 +1335,10 @@ void on_searchNamespaceComboBoxEntry_changed_fs(GtkWidget * dummy,
1324 gtk_widget_set_sensitive(spin, 1335 gtk_widget_set_sensitive(spin,
1325 FALSE); 1336 FALSE);
1326 } 1337 }
1327 FREENONNULL(descStr); 1338 if (descStr != NULL)
1328 FREENONNULL(encStr); 1339 free(descStr);
1340 if (encStr != NULL)
1341 free(encStr);
1329 DEBUG_END(); 1342 DEBUG_END();
1330} 1343}
1331 1344
diff --git a/src/plugins/fs/search.c b/src/plugins/fs/search.c
index 916504a5..dcf513e1 100644
--- a/src/plugins/fs/search.c
+++ b/src/plugins/fs/search.c
@@ -551,8 +551,10 @@ void on_fssearchbutton_clicked_fs(gpointer dummy2,
551 } 551 }
552 FREE(ustring); 552 FREE(ustring);
553 } 553 }
554 FREENONNULL(descStr); 554 if (descStr != NULL)
555 FREENONNULL(ns); 555 free(descStr);
556 if (ns != NULL)
557 free(ns);
556 } 558 }
557 if (uri == NULL) 559 if (uri == NULL)
558 uri = ECRS_parseCharKeywordURI(ectx, searchString); 560 uri = ECRS_parseCharKeywordURI(ectx, searchString);