Source-Changes-HG archive

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

[src/trunk]: src/lib/libwrap Return the buffer that has not been freed, so it...



details:   https://anonhg.NetBSD.org/src/rev/c58d943a4a36
branches:  trunk
changeset: 447476:c58d943a4a36
user:      kre <kre%NetBSD.org@localhost>
date:      Sat Jan 12 21:05:37 2019 +0000

description:
Return the buffer that has not been freed, so it can be later,
rather than the one that already was.

diffstat:

 lib/libwrap/expandm.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 1f115b135392 -r c58d943a4a36 lib/libwrap/expandm.c
--- a/lib/libwrap/expandm.c     Sat Jan 12 19:09:25 2019 +0000
+++ b/lib/libwrap/expandm.c     Sat Jan 12 21:05:37 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: expandm.c,v 1.2 2019/01/12 19:08:24 christos Exp $     */
+/*     $NetBSD: expandm.c,v 1.3 2019/01/12 21:05:37 kre Exp $  */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: expandm.c,v 1.2 2019/01/12 19:08:24 christos Exp $");
+__RCSID("$NetBSD: expandm.c,v 1.3 2019/01/12 21:05:37 kre Exp $");
 
 #include <stdio.h>
 #include <string.h>
@@ -63,7 +63,7 @@
 
        free(buf);
        if (rbuf)
-               *rbuf = buf;
+               *rbuf = nbuf;
        return nbuf;
 out:
        free(buf);



Home | Main Index | Thread Index | Old Index