Commits

Anonymous committed 24deea5

janitor: useless checks before free

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Comments (0)

Files changed (2)

 	if (pack_revindex_hashsz) {
 		int i;
 		for (i = 0; i < pack_revindex_hashsz; i++)
-			if (pack_revindex[i].revindex)
-				free(pack_revindex[i].revindex);
+			free(pack_revindex[i].revindex);
 		free(pack_revindex);
 		pack_revindex_hashsz = 0;
 	}
 {
 	while (targets--) {
 		free(target[targets]);
-		if (write_ref && write_ref[targets])
+		if (write_ref)
 			free((char *) write_ref[targets]);
 	}
 }