Module Name:    src
Committed By:   kre
Date:           Sat Jan 12 21:05:37 UTC 2019

Modified Files:
        src/lib/libwrap: expandm.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libwrap/expandm.c

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

Modified files:

Index: src/lib/libwrap/expandm.c
diff -u src/lib/libwrap/expandm.c:1.2 src/lib/libwrap/expandm.c:1.3
--- src/lib/libwrap/expandm.c:1.2	Sat Jan 12 19:08:24 2019
+++ src/lib/libwrap/expandm.c	Sat Jan 12 21:05:37 2019
@@ -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 @@ expandm(const char *fmt, const char *sf,
 
 	free(buf);
 	if (rbuf)
-		*rbuf = buf;
+		*rbuf = nbuf;
 	return nbuf;
 out:
 	free(buf);

Reply via email to