X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Falloc_entry.c;h=1496752f1956ec483b8f7674af61ba5d082d28e3;hp=3af5f5d83e6b08215d6b954da6af7ca10a900b2b;hb=e6c7286022d8a7a7ea7f15a6ffa7f9addb00e42d;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8 diff --git a/ncurses/tinfo/alloc_entry.c b/ncurses/tinfo/alloc_entry.c index 3af5f5d8..1496752f 100644 --- a/ncurses/tinfo/alloc_entry.c +++ b/ncurses/tinfo/alloc_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -48,7 +48,7 @@ #include #include -MODULE_ID("$Id: alloc_entry.c,v 1.45 2005/06/04 22:07:53 tom Exp $") +MODULE_ID("$Id: alloc_entry.c,v 1.47 2006/12/16 19:06:58 tom Exp $") #define ABSENT_OFFSET -1 #define CANCELLED_OFFSET -2 @@ -83,7 +83,7 @@ _nc_init_entry(TERMTYPE *const tp) tp->ext_Strings = 0; #endif if (tp->Booleans == 0) - tp->Booleans = typeMalloc(char, BOOLCOUNT); + tp->Booleans = typeMalloc(NCURSES_SBOOL, BOOLCOUNT); if (tp->Numbers == 0) tp->Numbers = typeMalloc(short, NUMCOUNT); if (tp->Strings == 0) @@ -281,7 +281,9 @@ _nc_merge_entry(TERMTYPE *const to, TERMTYPE *const from) NCURSES_EXPORT(void) _nc_alloc_entry_leaks(void) { - FreeAndNull(stringbuf); + if (stringbuf != 0) { + FreeAndNull(stringbuf); + } next_free = 0; } #endif