svn commit: r327270 - head/sbin/pfctl

Warner Losh imp at FreeBSD.org
Thu Dec 28 05:33:57 UTC 2017


Author: imp
Date: Thu Dec 28 05:33:54 2017
New Revision: 327270
URL: https://svnweb.freebsd.org/changeset/base/327270

Log:
  Free path before returnig.
  
  CID: 977827

Modified:
  head/sbin/pfctl/pfctl.c

Modified: head/sbin/pfctl/pfctl.c
==============================================================================
--- head/sbin/pfctl/pfctl.c	Thu Dec 28 05:33:49 2017	(r327269)
+++ head/sbin/pfctl/pfctl.c	Thu Dec 28 05:33:54 2017	(r327270)
@@ -1510,6 +1510,7 @@ pfctl_rules(int dev, char *filename, int opts, int opt
 		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);
 	}
 


More information about the svn-src-head mailing list