ports/90361: [MAINTAINER] mail/dspam-devel: Fix memory leak; bump PORTREVISION
Ion-Mihai IOnut Tetcu
itetcu at people.tecnik93.com
Tue Dec 13 21:40:28 UTC 2005
>Number: 90361
>Category: ports
>Synopsis: [MAINTAINER] mail/dspam-devel: Fix memory leak; bump PORTREVISION
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Tue Dec 13 21:40:04 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Ion-Mihai "IOnut" Tetcu
>Release: FreeBSD 6.0-STABLE i386
>Organization:
Tecnik'93
>Environment:
System: FreeBSD 6.0-STABLE #5: Thu Dec 1 02:08:55 EET 2005
>Description:
Fix memory leak in BNR (resurrect files/patch-src_libdspam.c from Attic but with
totally different content imported from vendor CVS).
Bump PORTREVISION.
Funny how after a few weeks of nobody doing nothing, after one day of testing a
fix two other people posted on dspam-devel and the vendor made a slightly different
commit in his CVS.
// I also dropped a few CVS IDs from port files to reduce cvs diff noise.
>How-To-Repeat:
>Fix:
--- dspam-devel-3.6.2_to_3.6.2_1.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/dspam-devel/Makefile,v
retrieving revision 1.1.1.2
retrieving revision 1.12
diff -u -r1.1.1.2 -r1.12
--- Makefile 13 Dec 2005 20:43:28 -0000 1.1.1.2
+++ Makefile 13 Dec 2005 21:09:01 -0000 1.12
@@ -3,7 +3,8 @@
# Whom: Ion-Mihai "IOnut" Tetcu <itetcu at people.tecnik93.com>
#
# $FreeBSD: ports/mail/dspam-devel/Makefile,v 1.41 2005/12/12 07:25:35 lawrance Exp $
-# $Tecnik: ports/mail/dspam-devel/Makefile,v 1.1.1.2 2005/12/13 20:43:28 itetcu Exp $
+#
+# $Tecnik: ports/mail/dspam-devel/Makefile,v 1.12 2005/12/13 21:09:01 itetcu Exp $
#
# Note to commiters: If don't commit a maintainer patch and as a result PKGNAME
@@ -13,6 +14,7 @@
PORTNAME= dspam-devel
PORTVERSION= ${PORTVER_MAJ}${SNAP_DATE}
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://people.tecnik93.com/~itetcu/FreeBSD/ports/${PORTNAME}/sources/
@@ -40,7 +42,7 @@
FETCH_BEFORE_ARGS= -v -o ${DISTDIR}/${PORTNAME}-${PORTVERSION}.tar.gz
.endif
-_UPD_LINE_NO= 17
+_UPD_LINE_NO= 6
## debug / log / admin options
OPTIONS= DEBUG "Enable debugging logging" on
Index: pkg-message
===================================================================
RCS file: /home/ncvs/ports/mail/dspam-devel/pkg-message,v
retrieving revision 1.1.1.2
retrieving revision 1.5
diff -u -r1.1.1.2 -r1.5
--- pkg-message 13 Dec 2005 20:43:28 -0000 1.1.1.2
+++ pkg-message 13 Dec 2005 21:19:50 -0000 1.5
@@ -1,5 +1,3 @@
-%%FreeBSD%%$FreeBSD: ports/mail/dspam-devel/pkg-message,v 1.11 2005/12/12 07:25:35 lawrance Exp $
-%%Tecnik%%$Tecnik: ports/mail/dspam-devel/pkg-message,v 1.1.1.2 2005/12/13 20:43:28 itetcu Exp $
-------------------------------------------------------------------------------
Reporting problems, asking questions:
- FreeBSD specific port-related problems/questions/paches: maintainer
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/mail/dspam-devel/pkg-plist,v
retrieving revision 1.1.1.2
retrieving revision 1.4
diff -u -r1.1.1.2 -r1.4
--- pkg-plist 13 Dec 2005 20:43:28 -0000 1.1.1.2
+++ pkg-plist 13 Dec 2005 21:19:50 -0000 1.4
@@ -1,5 +1,3 @@
- at comment $FreeBSD: ports/mail/dspam-devel/pkg-plist,v 1.23 2005/12/12 07:25:35 lawrance Exp $
- at comment $Tecnik: ports/mail/dspam-devel/pkg-plist,v 1.1.1.2 2005/12/13 20:43:28 itetcu Exp $
%%HASH%%bin/cssstat
%%HASH%%bin/csscompress
%%HASH%%bin/cssclean
Index: files/UPDATING
===================================================================
RCS file: /home/ncvs/ports/mail/dspam-devel/files/UPDATING,v
retrieving revision 1.1.1.2
retrieving revision 1.9
diff -u -r1.1.1.2 -r1.9
--- files/UPDATING 13 Dec 2005 20:43:28 -0000 1.1.1.2
+++ files/UPDATING 13 Dec 2005 21:19:53 -0000 1.9
@@ -1,6 +1,3 @@
-$FreeBSD: ports/mail/dspam-devel/files/UPDATING,v 1.14 2005/12/12 07:25:35 lawrance Exp $
-$Tecnik: ports/mail/dspam-devel/files/UPDATING,v 1.1.1.2 2005/12/13 20:43:28 itetcu Exp $
-
This file documents some of the problems you may encounter when
upgrading dspam port. I will try my best to minimize these disruptions,
but sometimes they are unavoidable.
@@ -14,6 +11,13 @@
make extract; more `find . -type f -maxdepth 2 -name UPGRADING`
###########################################################################
+# dspam-devel-3.6.2_1 (2005-12-11 19:18)
+#
+
+Fix memory leak in BNR.
+
+
+###########################################################################
# dspam-devel-3.6.2 (2005-12-11 21:34)
#
Index: files/dspam-devel.sh.in
===================================================================
RCS file: /home/ncvs/ports/mail/dspam-devel/files/dspam-devel.sh.in,v
retrieving revision 1.1.1.2
retrieving revision 1.3
diff -u -r1.1.1.2 -r1.3
--- files/dspam-devel.sh.in 13 Dec 2005 20:43:28 -0000 1.1.1.2
+++ files/dspam-devel.sh.in 13 Dec 2005 21:09:37 -0000 1.3
@@ -1,7 +1,7 @@
#!/bin/sh
# $FreeBSD: ports/mail/dspam-devel/files/dspam-devel.sh.in,v 1.3 2005/12/12 07:25:35 lawrance Exp $
# formerly $ FreeBSD: ports/mail/dspam-devel/files/dspam.rc,v 1.2 2005/02/25 03:09:26 leeym Exp $
-# $Tecnik: ports/mail/dspam-devel/files/dspam-devel.sh.in,v 1.1.1.2 2005/12/13 20:43:28 itetcu Exp $
+# $Tecnik: ports/mail/dspam-devel/files/dspam-devel.sh.in,v 1.3 2005/12/13 21:09:37 itetcu Exp $
# PROVIDE: dspam
# REQUIRE: DAEMON %%MYSQL%% %%PGSQL%% %%CLAMD%%
Index: files/patch-src_libdspam.c
===================================================================
RCS file: /home/ncvs/ports/mail/dspam-devel/files/patch-src_libdspam.c,v
retrieving revision 1.1.1.1
retrieving revision 1.6
diff -u -r1.1.1.1 -r1.6
--- files/patch-src_libdspam.c 2 Dec 2005 22:55:02 -0000 1.1.1.1
+++ files/patch-src_libdspam.c 13 Dec 2005 21:13:09 -0000 1.6
@@ -1,23 +1,25 @@
---- src/libdspam.c 2 Nov 2005 19:39:28 -0000 1.142
-+++ src/libdspam.c 8 Nov 2005 15:26:44 -0000 1.143
-@@ -672,6 +672,8 @@
- current_heading = (ds_header_t) node_nt->ptr;
- if (!strcmp (current_heading->heading, "Received"))
- {
-+ char *data, *ptr, *tok;
-+
- // detect and skip "Received: (qmail..." lines
- if (!strncmp(current_heading->data, "(qmail", 6))
- {
-@@ -680,9 +682,8 @@
- continue;
- }
+Index: dspam/src/libdspam.c
+===================================================================
+RCS file: /usr/local/cvsroot/dspam/src/libdspam.c,v
+retrieving revision 1.144
+retrieving revision 1.145
+diff -u -r1.144 -r1.145
+--- src/libdspam.c 24 Nov 2005 14:09:12 -0000 1.144
++++ src/libdspam.c 13 Dec 2005 16:59:45 -0000 1.145
+@@ -1,4 +1,4 @@
+-/* $Id: libdspam.c,v 1.144 2005/11/24 14:09:12 jonz Exp $ */
++/* $Id: libdspam.c,v 1.145 2005/12/13 16:59:45 jonz Exp $ */
-- char *data = strdup (current_heading->data);
-- char *ptr = strstr (data, "from");
-- char *tok;
-+ data = strdup (current_heading->data);
-+ ptr = strstr (data, "from");
+ /*
+ DSPAM
+@@ -892,7 +892,9 @@
+ /* Apply Bayesian Noise Reduction */
+ if (CTX->flags & DSF_NOISE)
+ {
+- _ds_apply_bnr(CTX, diction);
++ ds_diction_t p = _ds_apply_bnr(CTX, diction);
++ if (p)
++ ds_diction_destroy(p);
+ }
- if (ptr != NULL)
- {
+ if (CTX->flags & DSF_WHITELIST)
--- dspam-devel-3.6.2_to_3.6.2_1.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list