diff --git a/ospfd/ospf_routemap.c b/ospfd/ospf_routemap.c index f9e11541fcbb..bdc65d23bf64 100644 --- a/ospfd/ospf_routemap.c +++ b/ospfd/ospf_routemap.c @@ -416,7 +416,7 @@ static void *route_set_metric_compile(const char *arg) { struct ospf_metric *metric; - metric = XCALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(uint32_t)); + metric = XCALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(*metric)); metric->used = false; if (all_digit(arg))