From 8187aff8b9edc5ad2fe8aad074b1ef4c4a373300 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 11 Oct 2011 09:06:09 +0000 Subject: [PATCH] Add missing log_error for alloc failure --- lib/config/config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/config/config.c b/lib/config/config.c index 2ed7bc735..cb143367d 100644 --- a/lib/config/config.c +++ b/lib/config/config.c @@ -99,8 +99,10 @@ int read_config_fd(struct dm_config_tree *cft, struct device *dev, } fb = fb + mmap_offset; } else { - if (!(buf = dm_malloc(size + size2))) - return_0; + if (!(buf = dm_malloc(size + size2))) { + log_error("Failed to allocate circular buffer."); + return 0; + } if (!dev_read_circular(dev, (uint64_t) offset, size, (uint64_t) offset2, size2, buf)) { goto out;