summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a036dd8)
raw | patch | inline | side by side (parent: a036dd8)
author | Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com> | |
Thu, 19 Jan 2017 12:31:52 +0000 (12:31 +0000) | ||
committer | Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com> | |
Thu, 19 Jan 2017 12:33:39 +0000 (12:33 +0000) |
Change-Id: I68f883415a1c5d75cecb748b6c5788b536903333
Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com>
Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com>
src/mcelog.c | patch | blob | history |
diff --git a/src/mcelog.c b/src/mcelog.c
index 484464f98bd37e31c1d35f9f483ccf5c17fe09cf..b5f91f18f66c12fed14e50794463cd7baf837aa5 100644 (file)
--- a/src/mcelog.c
+++ b/src/mcelog.c
sstrncpy(n->host, hostname_g, sizeof(n->host));
sstrncpy(n->type, "gauge", sizeof(n->type));
plugin_dispatch_notification(n);
+ if (n->meta)
+ plugin_notification_meta_free(n->meta);
}
static int socket_reinit(socket_adapter_t *self) {
if (plugin_notification_meta_add_string(n, MCELOG_DIMM_NAME, mr.dimm_name) <
0) {
ERROR("%s: add DIMM name meta data failed", MCELOG_PLUGIN);
+ plugin_notification_meta_free(n->meta);
return (-1);
}
if (plugin_notification_meta_add_signed_int(n, MCELOG_CORRECTED_ERR,
mr.corrected_err_total) < 0) {
ERROR("%s: add corrected errors meta data failed", MCELOG_PLUGIN);
+ plugin_notification_meta_free(n->meta);
return (-1);
}
if (plugin_notification_meta_add_signed_int(
n, "corrected memory timed errors", mr.corrected_err_timed) < 0) {
ERROR("%s: add corrected timed errors meta data failed", MCELOG_PLUGIN);
+ plugin_notification_meta_free(n->meta);
return (-1);
}
if (plugin_notification_meta_add_string(n, "corrected errors time period",
mr.corrected_err_timed_period) < 0) {
ERROR("%s: add corrected errors period meta data failed", MCELOG_PLUGIN);
+ plugin_notification_meta_free(n->meta);
return (-1);
}
if (plugin_notification_meta_add_signed_int(n, MCELOG_UNCORRECTED_ERR,
mr.uncorrected_err_total) < 0) {
ERROR("%s: add corrected errors meta data failed", MCELOG_PLUGIN);
+ plugin_notification_meta_free(n->meta);
return (-1);
}
if (plugin_notification_meta_add_signed_int(
n, "uncorrected memory timed errors", mr.uncorrected_err_timed) < 0) {
ERROR("%s: add corrected timed errors meta data failed", MCELOG_PLUGIN);
+ plugin_notification_meta_free(n->meta);
return (-1);
}
if (plugin_notification_meta_add_string(n, "uncorrected errors time period",
mr.uncorrected_err_timed_period) <
0) {
ERROR("%s: add corrected errors period meta data failed", MCELOG_PLUGIN);
+ plugin_notification_meta_free(n->meta);
return (-1);
}