Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/libnv/dist PR kern/54406: the result of vas...



details:   https://anonhg.NetBSD.org/src/rev/5ae335843525
branches:  trunk
changeset: 962530:5ae335843525
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Jul 24 11:12:30 2019 +0000

description:
PR kern/54406: the result of vasprintf (in the kernel) should be freed
by kmem_free(). Spotted by Mindaugas.

diffstat:

 sys/external/bsd/libnv/dist/nvpair.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 84172c9279ee -r 5ae335843525 sys/external/bsd/libnv/dist/nvpair.c
--- a/sys/external/bsd/libnv/dist/nvpair.c      Wed Jul 24 10:45:47 2019 +0000
+++ b/sys/external/bsd/libnv/dist/nvpair.c      Wed Jul 24 11:12:30 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvpair.c,v 1.7 2019/07/23 00:49:16 rmind Exp $ */
+/*     $NetBSD: nvpair.c,v 1.8 2019/07/24 11:12:30 martin Exp $        */
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -36,7 +36,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: head/sys/contrib/libnv/nvpair.c 335382 2018-06-19 18:43:02Z lwhsu $");
 #else
-__RCSID("$NetBSD: nvpair.c,v 1.7 2019/07/23 00:49:16 rmind Exp $");
+__RCSID("$NetBSD: nvpair.c,v 1.8 2019/07/24 11:12:30 martin Exp $");
 #endif
 
 #include <sys/param.h>
@@ -1216,7 +1216,7 @@
        if (len < 0)
                return (NULL);
        nvp = nvpair_create_string(name, str);
-       nv_free(str);
+       kmem_free(str, len);
        return (nvp);
 }
 #endif



Home | Main Index | Thread Index | Old Index