Source-Changes-HG archive

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

[src/trunk]: src/lib/libedit fix memory leak; thanks to Logan Gabriel



details:   https://anonhg.NetBSD.org/src/rev/c8d7248d8dd3
branches:  trunk
changeset: 566871:c8d7248d8dd3
user:      christos <christos%NetBSD.org@localhost>
date:      Sat May 22 23:21:28 2004 +0000

description:
fix memory leak; thanks to Logan Gabriel

diffstat:

 lib/libedit/term.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 045e4c12ffe7 -r c8d7248d8dd3 lib/libedit/term.c
--- a/lib/libedit/term.c        Sat May 22 23:17:04 2004 +0000
+++ b/lib/libedit/term.c        Sat May 22 23:21:28 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: term.c,v 1.39 2004/01/17 17:57:40 christos Exp $       */
+/*     $NetBSD: term.c,v 1.40 2004/05/22 23:21:28 christos Exp $       */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)term.c     8.2 (Berkeley) 4/30/95";
 #else
-__RCSID("$NetBSD: term.c,v 1.39 2004/01/17 17:57:40 christos Exp $");
+__RCSID("$NetBSD: term.c,v 1.40 2004/05/22 23:21:28 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -369,6 +369,8 @@
        el->el_term.t_str = NULL;
        el_free((ptr_t) el->el_term.t_val);
        el->el_term.t_val = NULL;
+       el_free((ptr_t) el->el_term.t_fkey);
+       el->el_term.t_fkey = NULL;
        term_free_display(el);
 }
 



Home | Main Index | Thread Index | Old Index