From 0a4ce0ff7d08fccff1fe48d0e837ae1a0bf59220 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Mon, 16 Feb 2009 11:53:02 +0100 Subject: [PATCH] perl plugin: Fixed a memory leak in pplugin_dispatch_notification(). Free the notification meta information that have possibly been allocated in notification2hv(). --- src/perl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/perl.c b/src/perl.c index d7087d1f..efb8bdd6 100644 --- a/src/perl.c +++ b/src/perl.c @@ -914,6 +914,8 @@ static int pplugin_dispatch_notification (pTHX_ HV *notif) { notification_t n; + int ret; + if (NULL == notif) return -1; @@ -922,7 +924,9 @@ static int pplugin_dispatch_notification (pTHX_ HV *notif) if (0 != hv2notification (aTHX_ notif, &n)) return -1; - return plugin_dispatch_notification (&n); + ret = plugin_dispatch_notification (&n); + plugin_notification_meta_free (&n); + return ret; } /* static int pplugin_dispatch_notification (HV *) */ /* -- 2.11.0