Index: sbin/ipfw/ipv6.c =================================================================== --- sbin/ipfw/ipv6.c +++ sbin/ipfw/ipv6.c @@ -339,6 +339,7 @@ { int len = 0; struct in6_addr *d = &(cmd->addr6); + char *oav; /* * Needed for multiple address. * Note d[1] points to struct in6_add r mask6 of cmd @@ -365,7 +366,7 @@ return (1); } - av = strdup(av); + oav = av = strdup(av); while (av) { /* * After the address we can have '/' indicating a mask, @@ -411,6 +412,7 @@ APPLY_MASK(d, &d[1]) /* mask base address with mask */ + /* Changes the value of av */ av = q; /* Check this entry */ @@ -446,7 +448,7 @@ if (len + 1 > F_LEN_MASK) errx(EX_DATAERR, "address list too long"); cmd->o.len |= len+1; - free(av); + free(oav); return (1); }