From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 512 invoked by alias); 11 Oct 2011 09:06:13 -0000 Received: (qmail 32572 invoked by uid 9737); 11 Oct 2011 09:06:10 -0000 Date: Tue, 11 Oct 2011 09:06:00 -0000 Message-ID: <20111011090610.32568.qmail@sourceware.org> From: zkabelac@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/config config.c Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00032.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-10-11 09:06:10 Modified files: lib/config : config.c Log message: Add missing log_error for alloc failure Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/config/config.c.diff?cvsroot=lvm2&r1=1.106&r2=1.107 --- LVM2/lib/config/config.c 2011/09/02 01:59:07 1.106 +++ LVM2/lib/config/config.c 2011/10/11 09:06:09 1.107 @@ -99,8 +99,10 @@ } 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;