prefix.c: replace free with XFREE for memory allocated with XMALLOC

Signed-off-by: Lou Berger <lberger@labn.net>
This commit is contained in:
Lou Berger 2016-11-07 07:33:15 -05:00
parent e3edd1d1d4
commit 21ab852483

View File

@ -665,7 +665,7 @@ str2prefix_ipv6 (const char *str, struct prefix_ipv6 *p)
strncpy (cp, str, pnt - str);
*(cp + (pnt - str)) = '\0';
ret = inet_pton (AF_INET6, cp, &p->prefix);
free (cp);
XFREE (MTYPE_TMP, cp);
if (ret == 0)
return 0;
plen = (u_char) atoi (++pnt);