From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22563 invoked by alias); 25 Jan 2012 22:35:37 -0000 Received: (qmail 22440 invoked by uid 9737); 25 Jan 2012 22:35:36 -0000 Date: Wed, 25 Jan 2012 22:35:00 -0000 Message-ID: <20120125223536.22434.qmail@sourceware.org> From: zkabelac@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/format_text export.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: 2012-01/txt/msg00095.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2012-01-25 22:35:36 Modified files: lib/format_text: export.c Log message: Instrument code that pointer are already released Set pointers to NULL since on the function exit they are no longer valid. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/export.c.diff?cvsroot=lvm2&r1=1.85&r2=1.86 --- LVM2/lib/format_text/export.c 2012/01/19 15:31:45 1.85 +++ LVM2/lib/format_text/export.c 2012/01/25 22:35:36 1.86 @@ -757,11 +757,15 @@ r = 1; out: - if (f->mem) + if (f->mem) { dm_pool_destroy(f->mem); + f->mem = NULL; + } - if (f->pv_names) + if (f->pv_names) { dm_hash_destroy(f->pv_names); + f->pv_names = NULL; + } return r; }