fix fd leak in got_object_open()
diff --git a/lib/object.c b/lib/object.c
index 40fa201..1a04ad4 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -263,7 +263,7 @@ got_object_open(struct got_object **obj, struct got_repository *repo,
}
done:
free(path);
- if (err && f)
+ if (f)
fclose(f);
return err;