[collectd] [PATCH] perl plugin: Fixed a segfault that appeared in Perl 5.10.
Sebastian Harl
sh at tokkee.org
Fri May 30 00:12:36 CEST 2008
In Perl 5.10, av_clear() (amongst others) does no longer allow NULL for
the passed array object pointer, thus we have to check for it ourselves.
Signed-off-by: Sebastian Harl <sh at tokkee.org>
---
src/perl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/perl.c b/src/perl.c
index 9bd3b4d..2bd03af 100644
--- a/src/perl.c
+++ b/src/perl.c
@@ -1118,7 +1118,7 @@ static c_ithread_t *c_ithread_create (PerlInterpreter *base)
aTHX = t->interp;
- if (NULL != base) {
+ if ((NULL != base) && (NULL != PL_endav)) {
av_clear (PL_endav);
av_undef (PL_endav);
PL_endav = Nullav;
--
1.5.5.1.316.g377d9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080530/ba2f7bd4/attachment.pgp
More information about the collectd
mailing list