From d6b30b974af0fddb4bddde410cd7b00a9b877496 Mon Sep 17 00:00:00 2001 From: "Korynkevych, RomanX" Date: Tue, 20 Jun 2017 16:02:29 +0100 Subject: [PATCH] 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 --- src/mcelog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } } -- 2.11.0