diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 6f274f71032fb00c6cb7abfd8e8929ee916647d1..3a09de18346e8bbd79ac4ed02de4b99183d30dbc 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -9931,8 +9931,7 @@ resolve_select_type (gfc_code *code, gfc_namespace *old_ns)
   gfc_resolve_blocks (code->block, gfc_current_ns);
   gfc_current_ns = old_ns;
 
-  if (ref)
-    free (ref);
+  free(ref);
 }
 
 
diff --git a/libgfortran/caf/single.c b/libgfortran/caf/single.c
index bb06bd36db5bc9b7a2d52419d162f4616c1a15f1..fea8b0cc204c4e09295f05393e33fabe0c74a50e 100644
--- a/libgfortran/caf/single.c
+++ b/libgfortran/caf/single.c
@@ -163,10 +163,8 @@ _gfortran_caf_register (size_t size, caf_register_t type, caf_token_t *token,
       /* Freeing the memory conditionally seems pointless, but
 	 caf_internal_error () may return, when a stat is given and then the
 	 memory may be lost.  */
-      if (local)
-	free (local);
-      if (*token)
-	free (*token);
+      free(local);
+      free(*token);
       caf_internal_error (alloc_fail_msg, stat, errmsg, errmsg_len);
       return;
     }
diff --git a/libgfortran/io/async.c b/libgfortran/io/async.c
index 81d1d8175aaacc576e1529ebaf050e1a922ea325..01adf8f3f7837705ffdb0952fa159b03185dfb24 100644
--- a/libgfortran/io/async.c
+++ b/libgfortran/io/async.c
@@ -71,8 +71,7 @@ update_pdt (st_parameter_dt **old, st_parameter_dt *new) {
   NOTE ("Changing pdts, current_unit = %p", (void *) (new->u.p.current_unit));
   temp = *old;
   *old = new;
-  if (temp)
-    free (temp);
+  free(temp);
 }
 
 /* Destroy an adv_cond structure.  */
@@ -106,8 +105,7 @@ async_io (void *arg)
       /* Loop over the queue entries until they are finished.  */
       while (ctq)
 	{
-	  if (prev)
-	    free (prev);
+	  free(prev);
 	  prev = ctq;
 	  if (!au->error.has_error)
 	    {
diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c
index 9e06902ddb7bc44f7f857d508b03dd3bf1aa7793..66acbf04d08618fa52edd51e8ba1b66056ee6309 100644
--- a/libgfortran/io/format.c
+++ b/libgfortran/io/format.c
@@ -269,8 +269,7 @@ free_format_data (format_data *fmt)
        fnp->format != FMT_NONE; fnp++)
     if (fnp->format == FMT_DT)
 	{
-	  if (GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist))
-	    free (GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist));
+	  free(GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist));
 	  free (fnp->u.udf.vlist);
 	}
 
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 8bb5d1101ca0f86af9dd06acf84bbe170ba863c8..19b0b9a9324778e50c1b0befeaa5ccb89316188d 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -4522,8 +4522,7 @@ st_read_done_worker (st_parameter_dt *dtp, bool unlock)
 	    {
 	      free (dtp->u.p.current_unit->filename);
 	      dtp->u.p.current_unit->filename = NULL;
-	      if (dtp->u.p.current_unit->ls)
-		free (dtp->u.p.current_unit->ls);
+	      free(dtp->u.p.current_unit->ls);
 	      dtp->u.p.current_unit->ls = NULL;
 	    }
 	  free_newunit = true;
@@ -4619,8 +4618,7 @@ st_write_done_worker (st_parameter_dt *dtp, bool unlock)
 	    {
 	      free (dtp->u.p.current_unit->filename);
 	      dtp->u.p.current_unit->filename = NULL;
-	      if (dtp->u.p.current_unit->ls)
-		free (dtp->u.p.current_unit->ls);
+	      free(dtp->u.p.current_unit->ls);
 	      dtp->u.p.current_unit->ls = NULL;
 	    }
 	  free_newunit = true;
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index ba12be0825281322aa1b48bb8dea3d3913c83da2..ef35b85570facd79b131fc8d5b8e4d8a94975858 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -1028,8 +1028,7 @@ mem_flush (unix_stream *s __attribute__ ((unused)))
 static int
 mem_close (unix_stream *s)
 {
-  if (s)
-    free (s);
+  free(s);
   return 0;
 }