Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2012 00:28:52 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r244459 - stable/9/usr.sbin/pw
Message-ID:  <201212200028.qBK0SqUp021287@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Thu Dec 20 00:28:52 2012
New Revision: 244459
URL: http://svnweb.freebsd.org/changeset/base/244459

Log:
  MFC r243894:
  	Remove useless check for NULL prior to free.
  
  Approved by:	cperciva (implicit)

Modified:
  stable/9/usr.sbin/pw/bitmap.c
  stable/9/usr.sbin/pw/pw_group.c
Directory Properties:
  stable/9/usr.sbin/pw/   (props changed)

Modified: stable/9/usr.sbin/pw/bitmap.c
==============================================================================
--- stable/9/usr.sbin/pw/bitmap.c	Thu Dec 20 00:28:51 2012	(r244458)
+++ stable/9/usr.sbin/pw/bitmap.c	Thu Dec 20 00:28:52 2012	(r244459)
@@ -50,8 +50,7 @@ bm_alloc(int size)
 void
 bm_dealloc(struct bitmap * bm)
 {
-	if (bm->map)
-		free(bm->map);
+	free(bm->map);
 }
 
 static void

Modified: stable/9/usr.sbin/pw/pw_group.c
==============================================================================
--- stable/9/usr.sbin/pw/pw_group.c	Thu Dec 20 00:28:51 2012	(r244458)
+++ stable/9/usr.sbin/pw/pw_group.c	Thu Dec 20 00:28:52 2012	(r244459)
@@ -272,8 +272,7 @@ pw_group(struct userconf * cnf, int mode
 
 	pw_log(cnf, mode, W_GROUP, "%s(%ld)", grp->gr_name, (long) grp->gr_gid);
 
-	if (members)
-		free(members);
+	free(members);
 
 	return EXIT_SUCCESS;
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212200028.qBK0SqUp021287>