Index: uspace/srv/fs/mfs/mfs_rw.c
===================================================================
--- uspace/srv/fs/mfs/mfs_rw.c	(revision e895352e323192d57b75a7b781db308d52c5c444)
+++ uspace/srv/fs/mfs/mfs_rw.c	(revision 0c2d9bb57bc590e00bd17e5f7cf0937be160cca7)
@@ -104,7 +104,8 @@
     bool write_mode, uint32_t w_block)
 {
-	int r, nr_direct;
+	int nr_direct;
 	int ptrs_per_block;
-	uint32_t *ind_zone, *ind2_zone;
+	uint32_t *ind_zone = NULL, *ind2_zone = NULL;
+	int r = EOK;
 
 	struct mfs_ino_info *ino_i = mnode->ino_i;
@@ -130,5 +131,5 @@
 			ino_i->dirty = true;
 		}
-		return EOK;
+		goto out;
 	}
 
@@ -142,5 +143,5 @@
 				r = alloc_zone_and_clear(inst, &zone);
 				if (r != EOK)
-					return r;
+					goto out;
 
 				ino_i->i_izone[0] = zone;
@@ -149,5 +150,5 @@
 				/* Sparse block */
 				*b = 0;
-				return EOK;
+				goto out;
 			}
 		}
@@ -155,5 +156,5 @@
 		r = read_ind_zone(inst, ino_i->i_izone[0], &ind_zone);
 		if (r != EOK)
-			return r;
+			goto out;
 
 		*b = ind_zone[rblock];
@@ -163,5 +164,5 @@
 		}
 
-		goto out_free_ind1;
+		goto out;
 	}
 
@@ -176,5 +177,5 @@
 			r = alloc_zone_and_clear(inst, &zone);
 			if (r != EOK)
-				return r;
+				goto out;
 
 			ino_i->i_izone[1] = zone;
@@ -183,5 +184,5 @@
 			/* Sparse block */
 			*b = 0;
-			return EOK;
+			goto out;
 		}
 	}
@@ -189,5 +190,5 @@
 	r = read_ind_zone(inst, ino_i->i_izone[1], &ind_zone);
 	if (r != EOK)
-		return r;
+		goto out;
 
 	/*
@@ -203,5 +204,5 @@
 			r = alloc_zone_and_clear(inst, &zone);
 			if (r != EOK)
-				goto out_free_ind1;
+				goto out;
 
 			ind_zone[ind2_off] = zone;
@@ -209,7 +210,6 @@
 		} else {
 			/* Sparse block */
-			r = EOK;
 			*b = 0;
-			goto out_free_ind1;
+			goto out;
 		}
 	}
@@ -217,5 +217,5 @@
 	r = read_ind_zone(inst, ind_zone[ind2_off], &ind2_zone);
 	if (r != EOK)
-		goto out_free_ind1;
+		goto out;
 
 	*b = ind2_zone[rblock - (ind2_off * ptrs_per_block)];
@@ -225,8 +225,6 @@
 	}
 
-	r = EOK;
-
+out:
 	free(ind2_zone);
-out_free_ind1:
 	free(ind_zone);
 	return r;
