Free path before returnig.

CID: 977827
This commit is contained in:
imp 2017-12-28 05:33:54 +00:00
parent 2fdc0e9691
commit 1ccd04128b

View File

@ -1510,6 +1510,7 @@ pfctl_rules(int dev, char *filename, int opts, int optimize,
if (pfctl_trans(dev, t, DIOCXCOMMIT, osize))
ERR("DIOCXCOMMIT");
}
free(path);
return (0);
_error:
@ -1519,6 +1520,7 @@ pfctl_rules(int dev, char *filename, int opts, int optimize,
err(1, "DIOCXROLLBACK");
exit(1);
} else { /* sub ruleset */
free(path);
return (-1);
}