From: Alasdair G Kergon Date: Tue, 26 Oct 2010 14:29:45 +0100 Subject: [PATCH 2/5] Ensure seg is nonnull In-Reply-To: References: Message-ID: <20101026132945.GH29400@agk-dp.fab.redhat.com> List-Id: To: lvm-devel@redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue, Oct 26, 2010 at 02:59:23PM +0200, Zdenek Kabelac wrote: > + if (!seg) { > + log_error(INTERNAL_ERROR "Segment is not selected."); I don't mind assertions like this, but please describe the problem more accurately in the message. If this triggers, doesn't it mean we have a corrupt segment list? So say that. "LV %s segment list corrupted: NULL struct lv_segment detected." But isn't there a missing 'if (lv)' ? Alasdair