Source-Changes-HG archive

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

[src/trunk]: src/lib/libedit don't try to free() something allocated with all...



details:   https://anonhg.NetBSD.org/src/rev/2ae7a4b5ed71
branches:  trunk
changeset: 474308:2ae7a4b5ed71
user:      lukem <lukem%NetBSD.org@localhost>
date:      Sat Jul 03 11:55:51 1999 +0000

description:
don't try to free() something allocated with alloca() in rl_complete_internal().
(noticed while using completion in gdb and getting inundated with warnings from
the new free())

diffstat:

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

diffs (26 lines):

diff -r 2ed67e037b10 -r 2ae7a4b5ed71 lib/libedit/readline.c
--- a/lib/libedit/readline.c    Sat Jul 03 09:02:23 1999 +0000
+++ b/lib/libedit/readline.c    Sat Jul 03 11:55:51 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: readline.c,v 1.7 1999/07/02 15:21:26 simonb Exp $      */
+/*     $NetBSD: readline.c,v 1.8 1999/07/03 11:55:51 lukem Exp $       */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: readline.c,v 1.7 1999/07/02 15:21:26 simonb Exp $");
+__RCSID("$NetBSD: readline.c,v 1.8 1999/07/03 11:55:51 lukem Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -1345,7 +1345,6 @@
                arr = (*rl_attempted_completion_function) (temp, (int)
                                                           (end - len), end);
        }
-       free(temp);             /* no more needed */
 
        if (arr) {
                int             i;



Home | Main Index | Thread Index | Old Index