From 1ccd04128b8960d3307eacf508b5c18995673add Mon Sep 17 00:00:00 2001 From: imp 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 9586e1929991..5b4c67de6629 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); }