public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/lib format_text/archiver.c label/label.c
@ 2009-07-08 22:18 wysochanski
  0 siblings, 0 replies; only message in thread
From: wysochanski @ 2009-07-08 22:18 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-08 22:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-08 22:18 LVM2/lib format_text/archiver.c label/label.c wysochanski

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