diff --git a/src/match_value.c b/src/match_value.c
index 9ffcecaae473b9bc24b49d721e5b2914ae4bcfbe..64e1136703e9aaf2833a13fea9ded807a5802199 100644 (file)
--- a/src/match_value.c
+++ b/src/match_value.c
static void mv_free_match (mv_match_t *m) /* {{{ */
{
size_t i;
static void mv_free_match (mv_match_t *m) /* {{{ */
{
size_t i;
-
+
if (m == NULL)
return;
if (m == NULL)
return;
free(m->data_sources[i]);
free(m->data_sources);
}
free(m->data_sources[i]);
free(m->data_sources);
}
-
+
free (m);
} /* }}} void mv_free_match */
free (m);
} /* }}} void mv_free_match */
int status;
int i;
int status;
int i;
- m = (mv_match_t *) malloc (sizeof (*m));
+ m = calloc (1, sizeof (*m));
if (m == NULL)
{
if (m == NULL)
{
- ERROR ("mv_create: malloc failed.");
+ ERROR ("mv_create: calloc failed.");
return (-ENOMEM);
}
return (-ENOMEM);
}
- memset (m, 0, sizeof (*m));
m->min = NAN;
m->max = NAN;
m->min = NAN;
m->max = NAN;