[haiku-commits] haiku: hrev46229 - src/add-ons/kernel/file_systems/cdda

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 14 Oct 2013 22:57:56 +0200 (CEST)

hrev46229 adds 1 changeset to branch 'master'
old head: 85e57582d2647676e3fe6e902681c19082098464
new head: 45a52467063fd0623d8c34c0db7ff1abcbdb99a8
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=45a5246+%5E85e5758

----------------------------------------------------------------------------

45a5246: cdda: Fixed crash on allocation failure.
  
  * Thanks korli!

                                   [ Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev46229
Commit:      45a52467063fd0623d8c34c0db7ff1abcbdb99a8
URL:         http://cgit.haiku-os.org/haiku/commit/?id=45a5246
Author:      Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Date:        Mon Oct 14 20:57:25 2013 UTC

----------------------------------------------------------------------------

1 file changed, 3 insertions(+)
src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp | 3 +++

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp 
b/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp
index 158b8c5..d6f1916 100644
--- a/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp
+++ b/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp
@@ -433,6 +433,9 @@ read_attributes(int fd, Inode* inode)
                name[length] = '\0';
 
                Attribute* attribute = new(std::nothrow) Attribute(name, type);
+               if (attribute == NULL)
+                       return false;
+
                if (attribute->IsProtectedNamespace()) {
                        // Attributes in the protected namespace are handled 
internally
                        // so we do not load them even if they are present in 
the


Other related posts:

  • » [haiku-commits] haiku: hrev46229 - src/add-ons/kernel/file_systems/cdda - axeld