svn commit: r244457 - stable/8/usr.sbin/pw

Eitan Adler eadler at FreeBSD.org
Thu Dec 20 00:28:52 UTC 2012


Author: eadler
Date: Thu Dec 20 00:28:51 2012
New Revision: 244457
URL: http://svnweb.freebsd.org/changeset/base/244457

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

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

Modified: stable/8/usr.sbin/pw/bitmap.c
==============================================================================
--- stable/8/usr.sbin/pw/bitmap.c	Thu Dec 20 00:26:47 2012	(r244456)
+++ stable/8/usr.sbin/pw/bitmap.c	Thu Dec 20 00:28:51 2012	(r244457)
@@ -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/8/usr.sbin/pw/pw_group.c
==============================================================================
--- stable/8/usr.sbin/pw/pw_group.c	Thu Dec 20 00:26:47 2012	(r244456)
+++ stable/8/usr.sbin/pw/pw_group.c	Thu Dec 20 00:28:51 2012	(r244457)
@@ -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;
 }


More information about the svn-src-all mailing list