Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Free(3) delstr after use.



details:   https://anonhg.NetBSD.org/src/rev/1a6c5cf80fd8
branches:  trunk
changeset: 501781:1a6c5cf80fd8
user:      jdc <jdc%NetBSD.org@localhost>
date:      Sun Jan 07 13:56:42 2001 +0000

description:
Free(3) delstr after use.
Pointed out by Mike Grupenhoff in email.

diffstat:

 lib/libcurses/pause.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r 05efdf5b25dd -r 1a6c5cf80fd8 lib/libcurses/pause.c
--- a/lib/libcurses/pause.c     Sun Jan 07 13:48:24 2001 +0000
+++ b/lib/libcurses/pause.c     Sun Jan 07 13:56:42 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pause.c,v 1.3 2000/12/22 17:07:13 jdc Exp $    */
+/*     $NetBSD: pause.c,v 1.4 2001/01/07 13:56:42 jdc Exp $    */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: pause.c,v 1.3 2000/12/22 17:07:13 jdc Exp $");
+__RCSID("$NetBSD: pause.c,v 1.4 2001/01/07 13:56:42 jdc Exp $");
 #endif                         /* not lint */
 
 #include <stdarg.h>
@@ -83,5 +83,6 @@
        if (asprintf(&delstr, "%d", ms) == -1)
                return (ERR);
        tputs (delstr, 0, __cputchar);
+       free(delstr);
        return (OK);
 }



Home | Main Index | Thread Index | Old Index