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)) if (pfctl_trans(dev, t, DIOCXCOMMIT, osize))
ERR("DIOCXCOMMIT"); ERR("DIOCXCOMMIT");
} }
free(path);
return (0); return (0);
_error: _error:
@ -1519,6 +1520,7 @@ _error:
err(1, "DIOCXROLLBACK"); err(1, "DIOCXROLLBACK");
exit(1); exit(1);
} else { /* sub ruleset */ } else { /* sub ruleset */
free(path);
return (-1); return (-1);
} }