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 format_text/archiver.c label/label.c
Date: Wed, 08 Jul 2009 22:18:00 -0000	[thread overview]
Message-ID: <20090708221833.32518.qmail@sourceware.org> (raw)

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

Modified files:
	lib/format_text: archiver.c 
	lib/label      : label.c 

Log message:
	Make exit paths more robust when some init function fails.
	
	Author: Dave Wysochanski <dwysocha@redhat.com>

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archiver.c.diff?cvsroot=lvm2&r1=1.25&r2=1.26
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/label/label.c.diff?cvsroot=lvm2&r1=1.46&r2=1.47

--- LVM2/lib/format_text/archiver.c	2009/05/19 09:45:33	1.25
+++ LVM2/lib/format_text/archiver.c	2009/07/08 22:18:32	1.26
@@ -65,6 +65,8 @@
 
 void archive_exit(struct cmd_context *cmd)
 {
+	if (!cmd->archive_params)
+		return;
 	if (cmd->archive_params->dir)
 		dm_free(cmd->archive_params->dir);
 	memset(cmd->archive_params, 0, sizeof(*cmd->archive_params));
@@ -175,6 +177,8 @@
 
 void backup_exit(struct cmd_context *cmd)
 {
+	if (!cmd->backup_params)
+		return;
 	if (cmd->backup_params->dir)
 		dm_free(cmd->backup_params->dir);
 	memset(cmd->backup_params, 0, sizeof(*cmd->backup_params));
--- LVM2/lib/label/label.c	2009/02/20 23:19:28	1.46
+++ LVM2/lib/label/label.c	2009/07/08 22:18:32	1.47
@@ -72,7 +72,7 @@
 	struct dm_list *c, *n;
 	struct labeller_i *li;
 
-	for (c = _labellers.n; c != &_labellers; c = n) {
+	for (c = _labellers.n; c && c != &_labellers; c = n) {
 		n = c->n;
 		li = dm_list_item(c, struct labeller_i);
 		li->l->ops->destroy(li->l);


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

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090708221833.32518.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).