emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103046: charset.c (load_charset_map)


From: Jim Meyering
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103046: charset.c (load_charset_map): Don't deref NULL on failed malloc.
Date: Mon, 31 Jan 2011 08:34:45 +0100
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103046
committer: Jim Meyering <address@hidden>
branch nick: trunk
timestamp: Mon 2011-01-31 08:34:45 +0100
message:
  charset.c (load_charset_map): Don't deref NULL on failed malloc.
modified:
  src/ChangeLog
  src/charset.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-01-30 23:34:18 +0000
+++ b/src/ChangeLog     2011-01-31 07:34:45 +0000
@@ -1,3 +1,8 @@
+2011-01-31  Jim Meyering  <address@hidden>
+
+       * charset.c (load_charset_map): Don't deref NULL on failed malloc.
+       Use xmalloc rather than malloc.
+
 2011-01-30  Paul Eggert  <address@hidden>
 
        strftime: import from gnulib

=== modified file 'src/charset.c'
--- a/src/charset.c     2011-01-25 04:08:28 +0000
+++ b/src/charset.c     2011-01-31 07:34:45 +0000
@@ -292,7 +292,7 @@
       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,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]