diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2007-07-01 00:52:22 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2007-07-01 00:52:22 +0800 |
commit | df7c473823a735c64b07a7ce9845b2bdc12d2d75 (patch) | |
tree | 870b974594c714beb9b4adde4a991dd4861196eb | |
parent | 39f8aaf36181dafbdadbd0936769082081b1cb10 (diff) | |
download | marcuscom-ports-df7c473823a735c64b07a7ce9845b2bdc12d2d75.tar.gz marcuscom-ports-df7c473823a735c64b07a7ce9845b2bdc12d2d75.tar.zst marcuscom-ports-df7c473823a735c64b07a7ce9845b2bdc12d2d75.zip |
Correct a memory leak and tighten the lsof output checking in the procwd
code.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@9103 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r-- | devel/libgtop/Makefile | 4 | ||||
-rw-r--r-- | devel/libgtop/files/patch-sysdeps_freebsd_procwd.c | 15 |
2 files changed, 9 insertions, 10 deletions
diff --git a/devel/libgtop/Makefile b/devel/libgtop/Makefile index b88bbcc6c..d4f8e94f1 100644 --- a/devel/libgtop/Makefile +++ b/devel/libgtop/Makefile @@ -3,12 +3,12 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/devel/libgtop/Makefile,v 1.17 2007/06/27 18:06:39 marcus Exp $ +# $MCom: ports/devel/libgtop/Makefile,v 1.18 2007/06/27 19:03:30 marcus Exp $ # PORTNAME= libgtop PORTVERSION= 2.19.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_procwd.c b/devel/libgtop/files/patch-sysdeps_freebsd_procwd.c index 4b97a149e..544e0ba37 100644 --- a/devel/libgtop/files/patch-sysdeps_freebsd_procwd.c +++ b/devel/libgtop/files/patch-sysdeps_freebsd_procwd.c @@ -1,6 +1,6 @@ ---- sysdeps/freebsd/procwd.c.orig 2007-06-26 00:49:06.000000000 -0400 -+++ sysdeps/freebsd/procwd.c 2007-06-27 13:57:10.000000000 -0400 -@@ -0,0 +1,122 @@ +--- sysdeps/freebsd/procwd.c.orig 2007-06-30 12:37:18.000000000 -0400 ++++ sysdeps/freebsd/procwd.c 2007-06-30 12:42:35.000000000 -0400 +@@ -0,0 +1,121 @@ +/* Copyright (C) 2007 Joe Marcus Clarke + This file is part of LibGTop 2. + @@ -58,14 +58,9 @@ + len = g_strv_length(lines); + + for (i = 0; i < len && lines[i]; i++) { -+ + if (strlen(lines[i]) < 2) + continue; + -+ if (!g_str_has_prefix(lines[i], "f") && -+ !g_str_has_prefix(lines[i], "n")) -+ continue; -+ + if (!strcmp(lines[i], "fcwd")) { + nextwd = TRUE; + continue; @@ -76,6 +71,9 @@ + continue; + } + ++ if (!g_str_has_prefix(lines[i], "n")) ++ continue; ++ + if (nextwd) { + g_ptr_array_add(dirs, g_strdup(lines[i] + 1)); + nextwd = FALSE; @@ -112,6 +110,7 @@ + GPtrArray *dirs; + + dirs = parse_output(output, buf); ++ g_free(output); + + buf->number = dirs->len; + buf->flags |= (1 << GLIBTOP_PROC_WD_NUMBER); |