Module Name:    src
Committed By:   dholland
Date:           Mon May 30 17:21:07 UTC 2016

Modified Files:
        src/dist/pf/sbin/pfctl: pfctl_optimize.c

Log Message:
PR 50709 David Binderman: memory leak


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/dist/pf/sbin/pfctl/pfctl_optimize.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/dist/pf/sbin/pfctl/pfctl_optimize.c
diff -u src/dist/pf/sbin/pfctl/pfctl_optimize.c:1.6 src/dist/pf/sbin/pfctl/pfctl_optimize.c:1.7
--- src/dist/pf/sbin/pfctl/pfctl_optimize.c:1.6	Wed Jun 18 09:06:26 2008
+++ src/dist/pf/sbin/pfctl/pfctl_optimize.c	Mon May 30 17:21:07 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pfctl_optimize.c,v 1.6 2008/06/18 09:06:26 yamt Exp $	*/
+/*	$NetBSD: pfctl_optimize.c,v 1.7 2016/05/30 17:21:07 dholland Exp $	*/
 /*	$OpenBSD: pfctl_optimize.c,v 1.13 2006/10/31 14:17:45 mcbride Exp $ */
 
 /*
@@ -902,6 +902,7 @@ load_feedback_profile(struct pfctl *pf, 
 		pr.nr = nr;
 		if (ioctl(pf->dev, DIOCGETRULE, &pr)) {
 			warn("DIOCGETRULES");
+			free(por);
 			return (1);
 		}
 		memcpy(&por->por_rule, &pr.rule, sizeof(por->por_rule));

Reply via email to