[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b
Tomasz Kojm
tkojm at clamav.net
Sun Apr 4 01:06:17 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 6039e6d487818d3bcf0520dd1c71f921e2a75f81
Author: Tomasz Kojm <tkojm at clamav.net>
Date: Wed Sep 30 17:15:37 2009 +0200
libclamav/matcher-bm.c: fix cli_bm_freeoff() (bb#1710)
diff --git a/ChangeLog b/ChangeLog
index b367cd6..d93fdf2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Sep 30 17:15:05 CEST 2009 (tk)
+----------------------------------
+ * libclamav/matcher-bm.c: fix cli_bm_freeoff() (bb#1710)
+
Wed Sep 30 12:40:50 CEST 2009 (acab)
------------------------------------
* clamdscan/clamdscan.c: properly init variable (bb#1708)
diff --git a/libclamav/matcher-bm.c b/libclamav/matcher-bm.c
index 7b4892b..da7befd 100644
--- a/libclamav/matcher-bm.c
+++ b/libclamav/matcher-bm.c
@@ -155,7 +155,7 @@ int cli_bm_initoff(const struct cli_matcher *root, struct cli_bm_off *data, int
if(!root->bm_patterns) {
- data->offtab = data->offset = 0;
+ data->offtab = data->offset = NULL;
data->cnt = data->pos = 0;
return CL_SUCCESS;
}
@@ -206,10 +206,12 @@ int cli_bm_initoff(const struct cli_matcher *root, struct cli_bm_off *data, int
void cli_bm_freeoff(struct cli_bm_off *data, const struct cli_matcher *root)
{
- mpool_free(root->mempool, data->offset);
- data->offset = NULL;
- mpool_free(root->mempool, data->offtab);
- data->offtab = NULL;
+ if(data->offset) {
+ mpool_free(root->mempool, data->offset);
+ data->offset = NULL;
+ mpool_free(root->mempool, data->offtab);
+ data->offtab = NULL;
+ }
}
void cli_bm_free(struct cli_matcher *root)
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list