Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/dist/pf/sbin/pfctl PR 50709 David Binderman: memory leak



details:   https://anonhg.NetBSD.org/src/rev/bf4d62638b41
branches:  trunk
changeset: 345492:bf4d62638b41
user:      dholland <dholland%NetBSD.org@localhost>
date:      Mon May 30 17:21:07 2016 +0000

description:
PR 50709 David Binderman: memory leak

diffstat:

 dist/pf/sbin/pfctl/pfctl_optimize.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 8393912ede22 -r bf4d62638b41 dist/pf/sbin/pfctl/pfctl_optimize.c
--- a/dist/pf/sbin/pfctl/pfctl_optimize.c       Mon May 30 17:18:38 2016 +0000
+++ b/dist/pf/sbin/pfctl/pfctl_optimize.c       Mon May 30 17:21:07 2016 +0000
@@ -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 @@
                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));



Home | Main Index | Thread Index | Old Index