diff options
author | Oliver Lehmann <oliver@FreeBSD.org> | 2007-04-04 18:39:42 +0000 |
---|---|---|
committer | Oliver Lehmann <oliver@FreeBSD.org> | 2007-04-04 18:39:42 +0000 |
commit | afd80b43a1075843e4c9345fc70ae62d06f2a5c3 (patch) | |
tree | 05583f3c84e40e1a350ffb62a7e6d5cdb2223b3a /x11/xfce4-taskmanager | |
parent | Readd net/straw since it builds again (diff) |
fix a memory leak
bump PORTREVISION
PR: 109725
Submitted by: oliver
Patch by: Xavier Otazu <xotazu@cvc.uab.es>
Approved by: maintainer timeout (35 days)
Notes
Notes:
svn path=/head/; revision=189222
Diffstat (limited to 'x11/xfce4-taskmanager')
-rw-r--r-- | x11/xfce4-taskmanager/Makefile | 2 | ||||
-rw-r--r-- | x11/xfce4-taskmanager/files/patch-src-interface.c | 62 | ||||
-rw-r--r-- | x11/xfce4-taskmanager/files/patch-src-xfce-taskmanager-freebsd.c | 7 |
3 files changed, 67 insertions, 4 deletions
diff --git a/x11/xfce4-taskmanager/Makefile b/x11/xfce4-taskmanager/Makefile index 9c891ef1a23d..c695917c94c9 100644 --- a/x11/xfce4-taskmanager/Makefile +++ b/x11/xfce4-taskmanager/Makefile @@ -7,7 +7,7 @@ PORTNAME= xfce4-taskmanager PORTVERSION= 0.4.0.r2 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11 xfce MASTER_SITES= http://xfce4-taskmanager.nebulon.de/ DISTNAME= ${PORTNAME}-${PORTVERSION:S/.r/-rc/} diff --git a/x11/xfce4-taskmanager/files/patch-src-interface.c b/x11/xfce4-taskmanager/files/patch-src-interface.c new file mode 100644 index 000000000000..05e6ddf26d07 --- /dev/null +++ b/x11/xfce4-taskmanager/files/patch-src-interface.c @@ -0,0 +1,62 @@ +--- src/interface.c.orig Wed Aug 23 20:55:38 2006 ++++ src/interface.c Thu Mar 1 16:20:58 2007 +@@ -359,12 +359,9 @@ + + gint compare_int_list_item(GtkTreeModel *model, GtkTreeIter *iter1, GtkTreeIter *iter2, gpointer column) + { +- gchar *s1 = NULL; +- gchar *s2 = NULL; +- +- s1 = (gchar*)malloc(sizeof(char) * 100); +- s2 = (gchar*)malloc(sizeof(char) * 100); +- ++ gchar s1[256]; ++ gchar s2[256]; ++ + gint ret = 0; + + gtk_tree_model_get(model, iter1, column, &s1, -1); +@@ -380,40 +377,19 @@ + i2 = atoi(s2); + + ret = i1 - i2; +- +- if(s1 != NULL) +- g_free(s1); +- if(s2 != NULL) +- g_free(s2); +- + return ret; + } + + gint compare_string_list_item(GtkTreeModel *model, GtkTreeIter *iter1, GtkTreeIter *iter2, gpointer column) + { +- gchar *s1 = NULL; +- gchar *s2 = NULL; +- +- s1 = (gchar*)malloc(sizeof(gchar) * 100); +- s2 = (gchar*)malloc(sizeof(gchar) * 100); +- ++ gchar s1[256]; ++ gchar s2[256]; ++ + gint ret = 0; + + gtk_tree_model_get(model, iter1, GPOINTER_TO_INT(column), &s1, -1); + gtk_tree_model_get(model, iter2, GPOINTER_TO_INT(column), &s2, -1); +- +- if(s1 == NULL) +- s1 = ""; +- if(s2 == NULL) +- s2 = ""; +- + ret = strcmp(s1, s2); +- +- if(s1 != NULL) +- g_free(s1); +- if(s2 != NULL) +- g_free(s2); +- + return ret; + } + diff --git a/x11/xfce4-taskmanager/files/patch-src-xfce-taskmanager-freebsd.c b/x11/xfce4-taskmanager/files/patch-src-xfce-taskmanager-freebsd.c index 887864673cec..2a61eb9c874b 100644 --- a/x11/xfce4-taskmanager/files/patch-src-xfce-taskmanager-freebsd.c +++ b/x11/xfce4-taskmanager/files/patch-src-xfce-taskmanager-freebsd.c @@ -1,6 +1,6 @@ ---- src/xfce-taskmanager-freebsd.c.orig Thu Jan 1 01:00:00 1970 -+++ src/xfce-taskmanager-freebsd.c Thu Feb 1 12:17:27 2007 -@@ -0,0 +1,171 @@ +--- src/xfce-taskmanager-freebsd.c.orig Thu Mar 1 16:17:09 2007 ++++ src/xfce-taskmanager-freebsd.c Thu Mar 1 16:18:01 2007 +@@ -0,0 +1,172 @@ +/* + Copyright (c) 2006 Oliver Lehmann <oliver@FreeBSD.org> + All rights reserved. @@ -170,5 +170,6 @@ + } + + } ++ kvm_close(kd); + return task_list; +} |