Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/net Pull up following revision(s) (requested by knaka...



details:   https://anonhg.NetBSD.org/src/rev/b9e04638768d
branches:  netbsd-8
changeset: 852309:b9e04638768d
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Mar 15 14:47:22 2019 +0000

description:
Pull up following revision(s) (requested by knakahara in ticket #1216):

        sys/net/if_ipsec.c: revision 1.21

Fix ipsecif(4) memory leak in some ioctl cases.

diffstat:

 sys/net/if_ipsec.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 6c9d81c114cf -r b9e04638768d sys/net/if_ipsec.c
--- a/sys/net/if_ipsec.c        Fri Mar 15 14:44:05 2019 +0000
+++ b/sys/net/if_ipsec.c        Fri Mar 15 14:47:22 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ipsec.c,v 1.3.2.10 2018/10/21 11:55:54 martin Exp $  */
+/*     $NetBSD: if_ipsec.c,v 1.3.2.11 2019/03/15 14:47:22 martin Exp $  */
 
 /*
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.3.2.10 2018/10/21 11:55:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.3.2.11 2019/03/15 14:47:22 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1104,6 +1104,7 @@
                mutex_exit(&sc->ipsec_lock);
                encap_lock_exit();
                kmem_free(nvar, sizeof(*nvar));
+               kmem_free(nullvar, sizeof(*nullvar));
                return;
        }
 
@@ -1191,6 +1192,8 @@
                /* nothing to do */
                mutex_exit(&sc->ipsec_lock);
                encap_lock_exit();
+               kmem_free(nvar, sizeof(*nvar));
+               kmem_free(nullvar, sizeof(*nullvar));
                return 0;
        }
 



Home | Main Index | Thread Index | Old Index