1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-21 18:23:59 +00:00

charset.c (load_charset_map): Don't deref NULL on failed malloc.

This commit is contained in:
Jim Meyering 2011-01-31 08:34:45 +01:00
parent 32a400d4e1
commit 546961a989
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-01-31 Jim Meyering <meyering@redhat.com>
* charset.c (load_charset_map): Don't deref NULL on failed malloc.
Use xmalloc rather than malloc.
2011-01-30 Paul Eggert <eggert@cs.ucla.edu>
strftime: import from gnulib

View File

@ -292,7 +292,7 @@ load_charset_map (struct charset *charset, struct charset_map_entries *entries,
else
{
if (! temp_charset_work)
temp_charset_work = malloc (sizeof (*temp_charset_work));
temp_charset_work = xmalloc (sizeof (*temp_charset_work));
if (control_flag == 1)
{
memset (temp_charset_work->table.decoder, -1,