Commit 45d610198c7c185afea2660a4cf6b1b6ab9d03c3

Stefan Sperling 2019-04-11T14:34:48

avoid double file close in got_object_blob_create()

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/lib/object_create.c b/lib/object_create.c
index d916854..222b6b1 100644
--- a/lib/object_create.c
+++ b/lib/object_create.c
@@ -81,6 +81,7 @@ got_object_blob_create(struct got_object_id **id, struct got_repository *repo,
 		err = got_error_from_errno();
 		goto done;
 	}
+	fd = -1;
 
 	err = got_opentemp_named(&blobpath, &blobfile, "/tmp/got-blob-create");
 	if (err)