Package: firestarter / 1.0.3-11

18_fix_memleak.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From: RobNeild <b@bigbob.org.uk>
Subject: Fix memory leaks with g_slice memory allocator.

diff -Naur firestarter-1.0.3.orig/src/preferences.c firestarter-1.0.3/src/preferences.c
--- firestarter-1.0.3.orig/src/preferences.c	2005-01-29 12:32:08.000000000 +0000
+++ firestarter-1.0.3/src/preferences.c	2008-01-22 18:15:14.000000000 +0000
@@ -273,7 +273,7 @@
 			    1, _("Advanced Options"),
 			    -1);
 	gtk_tree_iter_free (top_section);
-	gtk_tree_iter_free (iter);
+	g_free (iter);
 
 	return GTK_TREE_MODEL (store);
 }
diff -Naur firestarter-1.0.3.orig/src/statusview.c firestarter-1.0.3/src/statusview.c
--- firestarter-1.0.3.orig/src/statusview.c	2005-01-29 12:32:08.000000000 +0000
+++ firestarter-1.0.3/src/statusview.c	2008-01-22 18:15:32.000000000 +0000
@@ -773,7 +773,7 @@
 {
 	Connection_entry *entry = (Connection_entry *)data;
 	
-	gtk_tree_iter_free (entry->ref);
+	g_free (entry->ref);
 	g_free (data);
 }

diff -Naur firestarter-1 (copy).0.3/src/policyview.c firestarter-1.0.3/src/policyview.c
--- firestarter-1 (copy).0.3/src/policyview.c	2005-01-29 12:32:08.000000000 +0000
+++ firestarter-1.0.3/src/policyview.c	2008-04-09 23:35:32.000000000 +0100
@@ -146,7 +146,7 @@
 
 	g_strfreev (tokens);
 	if (view != NULL)
-		gtk_tree_iter_free (iter);
+		g_free (iter);
 	return TRUE;
 }
 
@@ -218,7 +218,9 @@
 		gtk_entry_set_text (GTK_ENTRY (element), "");
 	}
 
-	g_object_steal_data (G_OBJECT (dialog), "editing");
+	GtkTreeIter *iter = g_object_steal_data (G_OBJECT (dialog), "editing");
+	if (iter)
+		g_free(iter);
 }
 
 static gboolean
@@ -428,7 +430,7 @@
 				gtk_list_store_remove (GTK_LIST_STORE (model), iter); /* Remove from the view */
 				remove_line_from_file (rule_file, (int)position);
 
-				gtk_tree_iter_free (iter);
+				g_free (iter);
 			}
 
 			append_to_file (rule_file, data, TRUE);