Received: by mail.netbsd.org (Postfix, from userid 605) id 290D285E68; Fri, 1 Apr 2016 19:59:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id AA48F85E5B for ; Fri, 1 Apr 2016 19:59:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id KfdiwTV1AvTS for ; Fri, 1 Apr 2016 19:59:08 +0000 (UTC) Received: from cvs.NetBSD.org (unknown [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 4B75984C6C for ; Fri, 1 Apr 2016 19:59:08 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 46063FBBA; Fri, 1 Apr 2016 19:59:08 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Fri, 1 Apr 2016 15:59:08 -0400 From: "Christos Zoulas" Subject: CVS commit: src/lib/libterminfo To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20160401195908.46063FBBA@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Christos Zoulas" Mail-Followup-To: source-changes-d@NetBSD.org Module Name: src Committed By: christos Date: Fri Apr 1 19:59:08 UTC 2016 Modified Files: src/lib/libterminfo: curterm.c termcap.c Log Message: - if we are freeing cur_term, set it to NULL. - preserve and free "last" properly. $ cat foo.c #include #include int main(void) { tgetent(NULL, "dumb"); tgetent(NULL, "network"); tgetflag("so"); return 0; } $ cc foo.c -lterminfo $ MALLOC_OPTIONS=J ./a.out Boom. XXX: pullup-7 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libterminfo/curterm.c cvs rdiff -u -r1.18 -r1.19 src/lib/libterminfo/termcap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.