From: Korynkevych, RomanX Date: Tue, 20 Jun 2017 15:02:29 +0000 (+0100) Subject: mcelog: set n.meta to NULL after meta data is cleared. X-Git-Tag: collectd-5.8.0~109^2~3 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d6b30b974af0fddb4bddde410cd7b00a9b877496;p=collectd.git mcelog: set n.meta to NULL after meta data is cleared. mcelog plugin got stuck after corrected and uncorrected memory errors injection. This is caused due to pointing n.meta to unknown place in memory as n.meta was not set to NULL after meta data has been cleared. Change-Id: I81bdbeb43a9858f0071e1798e4d7a15423832a35 Signed-off-by: Korynkevych, RomanX --- diff --git a/src/mcelog.c b/src/mcelog.c index 865b0d12..072564bf 100644 --- a/src/mcelog.c +++ b/src/mcelog.c @@ -380,6 +380,7 @@ static int mcelog_dispatch_mem_notifications(const mcelog_memory_rec_t *mr) { if (n.meta) plugin_notification_meta_free(n.meta); + n.meta = NULL; } } @@ -404,9 +405,9 @@ static int mcelog_dispatch_mem_notifications(const mcelog_memory_rec_t *mr) { sizeof(n.type_instance)); n.severity = NOTIF_FAILURE; plugin_dispatch_notification(&n); - if (n.meta) plugin_notification_meta_free(n.meta); + n.meta = NULL; } }