]> git.eshelyaron.com Git - emacs.git/commitdiff
charset.c (load_charset_map): Don't deref NULL on failed malloc.
authorJim Meyering <meyering@redhat.com>
Mon, 31 Jan 2011 07:34:45 +0000 (08:34 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 31 Jan 2011 07:34:45 +0000 (08:34 +0100)
src/ChangeLog
src/charset.c

index 393223c080285bfc7511916d9c4ac1ee83d44c39..63ea7c29bf42461ee3b673e70d587308379910d1 100644 (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
index 57e24ae0c3159d3326047929280daf55213b13ff..a60466001948cec0bf955176bdca5bbda72a54eb 100644 (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,