diff --git a/archival/dpkg.c b/archival/dpkg.c
index 8b25bac..23509fc 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -491,13 +491,9 @@
 	unsigned short i;
 	if (node) {
 		for (i = 0; i < node->num_of_edges; i++) {
-			if (node->edge[i]) {
-				free(node->edge[i]);
-			}
+			free(node->edge[i]);
 		}
-		if (node->edge) {
-			free(node->edge);
-		}
+		free(node->edge);
 		free(node);
 	}
 }
@@ -571,12 +567,8 @@
 				break;
 		}
 fill_package_struct_cleanup:
-		if (field_name) {
-			free(field_name);
-		}
-		if (field_value) {
-			free(field_value);
-		}
+		free(field_name);
+		free(field_value);
 	}
 
 	if (new_node->version == search_name_hashtable("unknown")) {
@@ -880,9 +872,7 @@
 			fprintf(new_status_file, "%s\n\n", control_buffer);
 		}
 
-		if (status_from_file != NULL) {
-			free(status_from_file);
-		}
+		free(status_from_file);
 		free(package_name);
 		free(control_buffer);
 	}
@@ -1661,9 +1651,7 @@
 	free(deb_file);
 
 	for (i = 0; i < NAME_HASH_PRIME; i++) {
-		if (name_hashtable[i] != NULL) {
-			free(name_hashtable[i]);
-		}
+		free(name_hashtable[i]);
 	}
 
 	for (i = 0; i < PACKAGE_HASH_PRIME; i++) {
@@ -1673,9 +1661,7 @@
 	}
 
 	for (i = 0; i < STATUS_HASH_PRIME; i++) {
-		if (status_hashtable[i] != NULL) {
-			free(status_hashtable[i]);
-		}
+		free(status_hashtable[i]);
 	}
 
 	return(EXIT_SUCCESS);
diff --git a/archival/gzip.c b/archival/gzip.c
index da93157..971724d 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -111,7 +111,7 @@
 #  define ALLOC(type, array, size) { \
       array = (type*)xcalloc((size_t)(((size)+1L)/2), 2*sizeof(type)); \
    }
-#  define FREE(array) {if (array != NULL) free(array), array=NULL;}
+#  define FREE(array) {free(array), array=NULL;}
 #else
 #  define DECLARE(type, array, size)  static type array[size]
 #  define ALLOC(type, array, size)
diff --git a/coreutils/ls.c b/coreutils/ls.c
index d2a935d..853a180 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -360,8 +360,7 @@
 
 	cur = dnp[0];
 	while (cur != NULL) {
-		if (cur->fullname != NULL)
-			free(cur->fullname);	/* free the filename */
+		free(cur->fullname);	/* free the filename */
 		next = cur->next;
 		free(cur);		/* free the dnode */
 		cur = next;
diff --git a/editors/awk.c b/editors/awk.c
index aea852b..44c2f45 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -650,7 +650,7 @@
 		while (hi) {
 			thi = hi;
 			hi = hi->next;
-			if (thi->data.v.string) free(thi->data.v.string);
+			free(thi->data.v.string);
 			free(thi);
 		}
 		array->items[i] = NULL;
@@ -661,7 +661,7 @@
 /* clear a variable */
 static var *clrvar(var *v) {
 
-	if (v->string && !(v->type & VF_FSTR))
+	if (!(v->type & VF_FSTR))
 		free(v->string);
 
 	v->type &= VF_DONTTOUCH;
@@ -1504,7 +1504,7 @@
 		return;
 
 	is_f0_split = TRUE;
-	if (fstrings) free(fstrings);
+	free(fstrings);
 	fsrealloc(0);
 	n = awk_split(getvar_s(V[F0]), &fsplitter.n, &fstrings);
 	fsrealloc(n);
@@ -2376,8 +2376,7 @@
 				X.rsm = (rstream *)hash_search(fdhash, L.s);
 				if (X.rsm) {
 					R.i = X.rsm->is_pipe ? pclose(X.rsm->F) : fclose(X.rsm->F);
-					if (X.rsm->buffer)
-						free(X.rsm->buffer);
+					free(X.rsm->buffer);
 					hash_remove(fdhash, L.s);
 				}
 				if (R.i != 0)
diff --git a/editors/sed.c b/editors/sed.c
index 23e9d54..df62346 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -130,8 +130,7 @@
 			regfree(sed_cmds[ncmds].sub_match);
 			free(sed_cmds[ncmds].sub_match);
 		}
-		if (sed_cmds[ncmds].replace)
-			free(sed_cmds[ncmds].replace);
+		free(sed_cmds[ncmds].replace);
 	}
 
 	/* destroy the array */
diff --git a/editors/vi.c b/editors/vi.c
index 1275d13..835adb6 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -19,7 +19,7 @@
  */
 
 static const char vi_Version[] =
-	"$Id: vi.c,v 1.24 2002/10/26 10:19:19 andersen Exp $";
+	"$Id: vi.c,v 1.25 2002/11/28 11:27:23 aaronl Exp $";
 
 /*
  * To compile for standalone use:
@@ -383,8 +383,7 @@
 	} else {
 		for (; optind < argc; optind++) {
 			editing = 1;	// 0=exit, 1=one file, 2+ =many files
-			if (cfn != 0)
-				free(cfn);
+			free(cfn);
 			cfn = (Byte *) xstrdup(argv[optind]);
 			edit_file(cfn);
 		}
@@ -490,10 +489,8 @@
 	offset = 0;			// no horizontal offset
 	c = '\0';
 #ifdef CONFIG_FEATURE_VI_DOT_CMD
-	if (last_modifying_cmd != 0)
-		free(last_modifying_cmd);
-	if (ioq_start != NULL)
-		free(ioq_start);
+	free(last_modifying_cmd);
+	free(ioq_start);
 	ioq = ioq_start = last_modifying_cmd = 0;
 	adding2q = 0;
 #endif							/* CONFIG_FEATURE_VI_DOT_CMD */
@@ -998,8 +995,7 @@
 		// There is a read-able regular file
 		// make this the current file
 		q = (Byte *) xstrdup((char *) fn);	// save the cfn
-		if (cfn != 0)
-			free(cfn);		// free the old name
+		free(cfn);		// free the old name
 		cfn = q;			// remember new cfn
 
 	  vc5:
@@ -1048,8 +1044,7 @@
 		}
 		if (strlen((char *) args) > 0) {
 			// user wants a new filename
-			if (cfn != NULL)
-				free(cfn);
+			free(cfn);
 			cfn = (Byte *) xstrdup((char *) args);
 		} else {
 			// user wants file status info
@@ -1635,8 +1630,7 @@
 {
 	int li;
 
-	if (screen != 0)
-		free(screen);
+	free(screen);
 	screensize = ro * co + 8;
 	screen = (Byte *) xmalloc(screensize);
 	// initialize the new screen. assume this will be a empty file.
@@ -1652,10 +1646,7 @@
 {
 	if (size < 10240)
 		size = 10240;	// have a minimum size for new files
-	if (text != 0) {
-		//text -= 4;
-		free(text);
-	}
+	free(text);
 	text = (Byte *) xmalloc(size + 8);
 	memset(text, '\0', size);	// clear new text[]
 	//text += 4;		// leave some room for "oops"
@@ -2171,8 +2162,7 @@
 static void start_new_cmd_q(Byte c)
 {
 	// release old cmd
-	if (last_modifying_cmd != 0)
-		free(last_modifying_cmd);
+	free(last_modifying_cmd);
 	// get buffer for new cmd
 	last_modifying_cmd = (Byte *) xmalloc(BUFSIZ);
 	memset(last_modifying_cmd, '\0', BUFSIZ);	// clear new cmd queue
@@ -2227,9 +2217,7 @@
 	}
 	cnt = q - p + 1;
 	t = reg[dest];
-	if (t != 0) {		// if already a yank register
-		free(t);		//   free it
-	}
+	free(t);		//  if already a yank register, free it
 	t = (Byte *) xmalloc(cnt + 1);	// get a new register
 	memset(t, '\0', cnt + 1);	// clear new text[]
 	strncpy((char *) t, (char *) p, cnt);	// copy text[] into bufer
@@ -2615,8 +2603,7 @@
 		}
 	}
 	refresh(FALSE);
-	if (obufp != NULL)
-		free(obufp);
+	free(obufp);
 	obufp = (Byte *) xstrdup((char *) buf);
 	return (obufp);
 }
@@ -3454,9 +3441,7 @@
 			goto dc3;	// if no pat re-use old pat
 		if (strlen((char *) q) > 1) {	// new pat- save it and find
 			// there is a new pat
-			if (last_search_pattern != 0) {
-				free(last_search_pattern);
-			}
+			free(last_search_pattern);
 			last_search_pattern = (Byte *) xstrdup((char *) q);
 			goto dc3;	// now find the pattern
 		}
diff --git a/findutils/grep.c b/findutils/grep.c
index 6fe1833..cc2b697 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -153,8 +153,7 @@
 			else { /* no match */
 				/* Add the line to the circular 'before' buffer */
 				if(lines_before) {
-					if(before_buf[curpos])
-						free(before_buf[curpos]);
+					free(before_buf[curpos]);
 					before_buf[curpos] = xstrdup(line);
 					curpos = (curpos + 1) % lines_before;
 				}
@@ -225,8 +224,7 @@
 	while (--nregexes >= 0) {
 		regfree(&(regexes[nregexes]));
 	}
-	if (regexes)
-	    free(regexes);
+	free(regexes);
 }
 #endif
 
diff --git a/libpwdgrp/__getgrent.c b/libpwdgrp/__getgrent.c
index 39cf189..5fb4193 100644
--- a/libpwdgrp/__getgrent.c
+++ b/libpwdgrp/__getgrent.c
@@ -186,8 +186,7 @@
 		members[member_num + 1] = NULL;
 	}
 #else							/* !GR_SCALE_DYNAMIC */
-	if (members != NULL)
-	    free(members);
+	free(members);
 	members = (char **) malloc((member_num + 1) * sizeof(char *));   
 	for ( ; field_begin && *field_begin != '\0'; field_begin = ptr) {
 	    if ((ptr = strchr(field_begin, ',')) != NULL)
diff --git a/modutils/insmod.c b/modutils/insmod.c
index b367e84..eda4e1a 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -234,7 +234,7 @@
 #ifndef MODUTILS_MODULE_H
 static const int MODUTILS_MODULE_H = 1;
 
-#ident "$Id: insmod.c,v 1.91 2002/10/10 04:20:21 andersen Exp $"
+#ident "$Id: insmod.c,v 1.92 2002/11/28 11:27:27 aaronl Exp $"
 
 /* This file contains the structures used by the 2.0 and 2.1 kernels.
    We do not use the kernel headers directly because we do not wish
@@ -455,7 +455,7 @@
 #ifndef MODUTILS_OBJ_H
 static const int MODUTILS_OBJ_H = 1;
 
-#ident "$Id: insmod.c,v 1.91 2002/10/10 04:20:21 andersen Exp $"
+#ident "$Id: insmod.c,v 1.92 2002/11/28 11:27:27 aaronl Exp $"
 
 /* The relocatable object is manipulated using elfin types.  */
 
@@ -3589,8 +3589,7 @@
 				flag_export = 0;
 				break;
 			case 'o':			/* name the output module */
-				if(m_name)  /* Hmmm, duplicate "-o name". */
-					free(m_name);
+				free(m_name);
 				m_name = xstrdup(optarg);
 				break;
 			case 'L':			/* Stub warning */
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 295486c..b50b1ed 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -246,7 +246,7 @@
 		switch (c) {
 		case 'c':
 			len = strlen(optarg) > 255 ? 255 : strlen(optarg);
-			if (client_config.clientid) free(client_config.clientid);
+			free(client_config.clientid);
 			client_config.clientid = xmalloc(len + 2);
 			client_config.clientid[OPT_CODE] = DHCP_CLIENT_ID;
 			client_config.clientid[OPT_LEN] = len;
@@ -262,7 +262,7 @@
 		case 'h':
 		case 'H':
 			len = strlen(optarg) > 255 ? 255 : strlen(optarg);
-			if (client_config.hostname) free(client_config.hostname);
+			free(client_config.hostname);
 			client_config.hostname = xmalloc(len + 2);
 			client_config.hostname[OPT_CODE] = DHCP_HOST_NAME;
 			client_config.hostname[OPT_LEN] = len;
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index 842e0f2..cf72de1 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -38,7 +38,7 @@
 {
 	char **dest = arg;
 	
-	if (*dest) free(*dest);
+	free(*dest);
 	*dest = strdup(line);
 	
 	return 1;
diff --git a/shell/hush.c b/shell/hush.c
index 08b3b29..48d1d14 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -810,7 +810,7 @@
 static void b_free(o_string *o)
 {
 	b_reset(o);
-	if (o->data != NULL) free(o->data);
+	free(o->data);
 	o->data = NULL;
 	o->maxlen = 0;
 }
@@ -880,8 +880,7 @@
 #ifndef CONFIG_FEATURE_SH_FANCY_PROMPT
 	/* Set up the prompt */
 	if (promptmode == 1) {
-		if (PS1)
-			free(PS1);
+		free(PS1);
 		PS1=xmalloc(strlen(cwd)+4);
 		sprintf(PS1, "%s %s", cwd, ( geteuid() != 0 ) ?  "$ ":"# ");
 		*prompt_str = PS1;
diff --git a/shell/lash.c b/shell/lash.c
index 7994d26..c4d6ef0 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -518,12 +518,9 @@
 		if (cmd->progs[i].redirects)
 			free(cmd->progs[i].redirects);
 	}
-	if (cmd->progs)
-		free(cmd->progs);
-	if (cmd->text)
-		free(cmd->text);
-	if (cmd->cmdbuf)
-		free(cmd->cmdbuf);
+	free(cmd->progs);
+	free(cmd->text);
+	free(cmd->cmdbuf);
 	keep = cmd->job_list;
 	memset(cmd, 0, sizeof(struct job));
 	cmd->job_list = keep;
@@ -677,8 +674,7 @@
 #ifndef CONFIG_FEATURE_SH_FANCY_PROMPT
 	/* Set up the prompt */
 	if (shell_context == 0) {
-		if (PS1)
-			free(PS1);
+		free(PS1);
 		PS1=xmalloc(strlen(cwd)+4);
 		sprintf(PS1, "%s %s", cwd, ( geteuid() != 0 ) ?  "$ ":"# ");
 		*prompt_str = PS1;
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index dbe4f74..d332b6b 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -1314,9 +1314,7 @@
 
 	if (name_list) { 
 		for (i = 0; i < MAX_DEPTH; i++) {
-			if (name_list[i]) {
-				free(name_list[i]);
-			}
+			free(name_list[i]);
 		}
 		free(name_list);
 	}
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index 2390f30..e126d7b 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -92,8 +92,7 @@
         const char *argptr=arg;
         char *bufptr;
 
-        if (BUFFER != NULL)
-                free(BUFFER);
+        free(BUFFER);
 
         if (!quote) { /* Just copy arg */
                BUFFER=xstrdup(arg);
@@ -340,16 +339,14 @@
                         alternative=1;
                         break;
                 case 'o':
-                        if (optstr)
-                                free(optstr);
+                       free(optstr);
                        optstr=xstrdup(optarg);
                         break;
                 case 'l':
                         add_long_options(optarg);
                         break;
                 case 'n':
-                        if (name)
-                                free(name);
+                       free(name);
                        name=xstrdup(optarg);
                         break;
                 case 'q':
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 29e2e3b..391d245 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -158,10 +158,8 @@
 	this = mtab_cache;
 	while (this) {
 		next = this->next;
-		if (this->device)
-			free(this->device);
-		if (this->mountpt)
-			free(this->mountpt);
+		free(this->device);
+		free(this->mountpt);
 		free(this);
 		this = next;
 	}
