Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses After consultation with jdc@, apply the patch ...
details: https://anonhg.NetBSD.org/src/rev/606c0766dc37
branches: trunk
changeset: 755575:606c0766dc37
user: dholland <dholland%NetBSD.org@localhost>
date: Thu Jun 10 05:24:55 2010 +0000
description:
After consultation with jdc@, apply the patch from PR 42412 even though
the crash went away -- it's not clear that it went away for any reason
besides by accident.
The change is: use calloc instead of malloc for allocating SCREENs.
diffstat:
lib/libcurses/screen.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r fb2b11a3bc94 -r 606c0766dc37 lib/libcurses/screen.c
--- a/lib/libcurses/screen.c Wed Jun 09 23:02:44 2010 +0000
+++ b/lib/libcurses/screen.c Thu Jun 10 05:24:55 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: screen.c,v 1.22 2010/02/03 15:34:40 roy Exp $ */
+/* $NetBSD: screen.c,v 1.23 2010/06/10 05:24:55 dholland Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)screen.c 8.2 (blymn) 11/27/2001";
#else
-__RCSID("$NetBSD: screen.c,v 1.22 2010/02/03 15:34:40 roy Exp $");
+__RCSID("$NetBSD: screen.c,v 1.23 2010/06/10 05:24:55 dholland Exp $");
#endif
#endif /* not lint */
@@ -117,7 +117,7 @@
if ((type == NULL) && (sp = getenv("TERM")) == NULL)
return NULL;
- if ((new_screen = (SCREEN *) malloc(sizeof(SCREEN))) == NULL)
+ if ((new_screen = calloc(1, sizeof(SCREEN))) == NULL)
return NULL;
#ifdef DEBUG
Home |
Main Index |
Thread Index |
Old Index