Browse Source

isisd: Fix size of malloc

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
Christian Franke 3 years ago
parent
commit
ef9bc88981
1 changed files with 1 additions and 1 deletions
  1. 1 1
      isisd/isis_routemap.c

+ 1 - 1
isisd/isis_routemap.c

@@ -230,7 +230,7 @@ route_set_metric_compile(const char *arg)
   if (arg[0] == '\0' || *endp != '\0' || metric > MAX_WIDE_PATH_METRIC)
     return NULL;
 
-  ret = XCALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(ret));
+  ret = XCALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(*ret));
   *ret = metric;
 
   return ret;