Commit 546961a9 authored by Jim Meyering's avatar Jim Meyering
Browse files

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

parent 32a400d4
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
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment