]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/normal/crypto.c (read_crypto_list): Fix incorrect
authorNickolai Zeldovich <nickolai@csail.mit.edu>
Thu, 7 Mar 2013 07:41:27 +0000 (08:41 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 7 Mar 2013 07:41:27 +0000 (08:41 +0100)
OOM check.
* grub-core/normal/term.c (read_terminal_list): Likewise.

ChangeLog
grub-core/normal/crypto.c
grub-core/normal/term.c

index 96527dd10d4e4ad8d7f8f7b0aa75b5ea3f7e0dde..ca3d603d9445525c5c10a2268a33e594dff9f885 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-03-07  Nickolai Zeldovich <nickolai@csail.mit.edu>
+
+       * grub-core/normal/crypto.c (read_crypto_list): Fix incorrect
+       OOM check.
+       * grub-core/normal/term.c (read_terminal_list): Likewise.
+
 2013-03-07  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Lift up core size limits on some platforms. Fix potential memory
index e753dd799693538c9ef35691a9338a26d63930e9..2bfd67c8ef388097701a7415df3cd7321c6a1e57 100644 (file)
@@ -136,7 +136,7 @@ read_crypto_list (const char *prefix)
        }
       
       cur->name = grub_strdup (name);
-      if (! name)
+      if (! cur->name)
        {
          grub_errno = GRUB_ERR_NONE;
          grub_free (cur);
index ae91071cf77aee230663089a643eb2407b6c6a25..f89e5d2ed1cf747a22534a2848fa49b3302529d6 100644 (file)
@@ -389,7 +389,7 @@ read_terminal_list (const char *prefix)
        }
       
       cur->name = grub_strdup (name);
-      if (! name)
+      if (! cur->name)
        {
          grub_errno = GRUB_ERR_NONE;
          grub_free (cur);