From 076950009fa8372d0084a4c281478d412fdedeec Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 28 Dec 2017 05:33:54 +0000 Subject: [PATCH] Free path before returnig. CID: 977827 --- sbin/pfctl/pfctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 9586e192999..5b4c67de662 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -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); }