public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: wysochanski@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2/lib/commands toolcontext.c
Date: Wed, 08 Jul 2009 18:12:00 -0000	[thread overview]
Message-ID: <20090708181208.27957.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2009-07-08 18:12:08

Modified files:
	lib/commands   : toolcontext.c 

Log message:
	Make destroy_toolcontext() better able to handle NULL pointers.
	
	Part of twoerner's log_error() patches.
	
	Signed-off-by: Thomas Woerner <twoerner@redhat.com>
	Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.77&r2=1.78

--- LVM2/lib/commands/toolcontext.c	2009/07/08 12:36:01	1.77
+++ LVM2/lib/commands/toolcontext.c	2009/07/08 18:12:08	1.78
@@ -1302,12 +1302,15 @@
 	label_exit();
 	_destroy_segtypes(&cmd->segtypes);
 	_destroy_formats(&cmd->formats);
-	cmd->filter->destroy(cmd->filter);
-	dm_pool_destroy(cmd->mem);
+	if (cmd->filter)
+		cmd->filter->destroy(cmd->filter);
+	if (cmd->mem)
+		dm_pool_destroy(cmd->mem);
 	dev_cache_exit();
 	_destroy_tags(cmd);
 	_destroy_tag_configs(cmd);
-	dm_pool_destroy(cmd->libmem);
+	if (cmd->libmem)
+		dm_pool_destroy(cmd->libmem);
 	dm_free(cmd);
 
 	release_log_memory();


             reply	other threads:[~2009-07-08 18:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-08 18:12 wysochanski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-12 14:35 zkabelac
2012-03-01 21:16 zkabelac
2012-02-08 13:44 zkabelac
2011-09-02 12:38 zkabelac
2011-07-08 17:31 agk
2011-04-29 16:23 agk
2010-12-20 14:34 zkabelac
2010-07-02 10:25 agk
2010-06-01 21:46 wysochanski
2009-06-17 20:54 mbroz
2008-09-19 18:26 agk
2008-04-02 21:31 agk
2006-05-16 20:42 agk
2004-06-29 13:29 agk
2004-04-08 17:21 agk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090708181208.27957.qmail@sourceware.org \
    --to=wysochanski@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).