public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: zkabelac@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 lib/format_text/archiver.c lib/locking/cl ...
Date: Fri, 28 Jan 2011 10:16:00 -0000	[thread overview]
Message-ID: <20110128101605.32718.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2011-01-28 10:16:05

Modified files:
	lib/format_text: archiver.c 
	lib/locking    : cluster_locking.c 
	lib/misc       : timestamp.c 
	libdm/ioctl    : libdm-iface.c 

Log message:
	Skip NULL check before dm_free
	
	dm_free checks for NULL itself.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archiver.c.diff?cvsroot=lvm2&r1=1.37&r2=1.38
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/cluster_locking.c.diff?cvsroot=lvm2&r1=1.49&r2=1.50
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/timestamp.c.diff?cvsroot=lvm2&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/ioctl/libdm-iface.c.diff?cvsroot=lvm2&r1=1.87&r2=1.88

--- LVM2/lib/format_text/archiver.c	2011/01/05 15:06:10	1.37
+++ LVM2/lib/format_text/archiver.c	2011/01/28 10:16:04	1.38
@@ -69,8 +69,7 @@
 {
 	if (!cmd->archive_params)
 		return;
-	if (cmd->archive_params->dir)
-		dm_free(cmd->archive_params->dir);
+	dm_free(cmd->archive_params->dir);
 	memset(cmd->archive_params, 0, sizeof(*cmd->archive_params));
 }
 
@@ -183,8 +182,7 @@
 {
 	if (!cmd->backup_params)
 		return;
-	if (cmd->backup_params->dir)
-		dm_free(cmd->backup_params->dir);
+	dm_free(cmd->backup_params->dir);
 	memset(cmd->backup_params, 0, sizeof(*cmd->backup_params));
 }
 
--- LVM2/lib/locking/cluster_locking.c	2011/01/12 20:42:50	1.49
+++ LVM2/lib/locking/cluster_locking.c	2011/01/28 10:16:04	1.50
@@ -279,8 +279,7 @@
 	*response = rarray;
 
       out:
-	if (retbuf)
-		dm_free(retbuf);
+	dm_free(retbuf);
 
 	return status;
 }
--- LVM2/lib/misc/timestamp.c	2007/08/20 20:55:27	1.3
+++ LVM2/lib/misc/timestamp.c	2011/01/28 10:16:04	1.4
@@ -125,6 +125,5 @@
 
 void destroy_timestamp(struct timestamp *t)
 {
-	if (t)
-		dm_free(t);
+	dm_free(t);
 }
--- LVM2/libdm/ioctl/libdm-iface.c	2011/01/04 14:43:54	1.87
+++ LVM2/libdm/ioctl/libdm-iface.c	2011/01/28 10:16:04	1.88
@@ -486,20 +486,11 @@
 		dm_free(t);
 	}
 
-	if (dmt->dev_name)
-		dm_free(dmt->dev_name);
-
-	if (dmt->newname)
-		dm_free(dmt->newname);
-
-	if (dmt->message)
-		dm_free(dmt->message);
-
 	_dm_zfree_dmi(dmt->dmi.v4);
-
-	if (dmt->uuid)
-		dm_free(dmt->uuid);
-
+	dm_free(dmt->dev_name);
+	dm_free(dmt->newname);
+	dm_free(dmt->message);
+	dm_free(dmt->uuid);
 	dm_free(dmt);
 }
 


                 reply	other threads:[~2011-01-28 10:16 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=20110128101605.32718.qmail@sourceware.org \
    --to=zkabelac@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).