Free path before returnig.

CID: 977827
This commit is contained in:
Warner Losh 2017-12-28 05:33:54 +00:00
parent df017019c2
commit 076950009f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327270

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 @@ _error:
err(1, "DIOCXROLLBACK");
exit(1);
} else { /* sub ruleset */
free(path);
return (-1);
}