commit 835e0dbdc83dcd863487243b581bdb1055f50855 from: Stefan Sperling date: Thu Jun 21 21:42:37 2018 UTC init output param of got_object_open_as_* commit - 6fad634b7a4895ec1c8e911cb7a57ecf062dda10 commit + 835e0dbdc83dcd863487243b581bdb1055f50855 blob - 3bf9f6042a612ec493d55e91c4bb3fe3b468552d blob + 92f261b77ad672726166be16ae6a9c236961006e --- lib/object.c +++ lib/object.c @@ -447,6 +447,8 @@ got_object_open_as_commit(struct got_commit_object **c { const struct got_error *err; struct got_object *obj; + + *commit = NULL; err = got_object_open(&obj, repo, id); if (err) @@ -1131,6 +1133,8 @@ got_object_open_as_tree(struct got_tree_object **tree, { const struct got_error *err; struct got_object *obj; + + *tree = NULL; err = got_object_open(&obj, repo, id); if (err) @@ -1327,6 +1331,8 @@ got_object_open_as_blob(struct got_blob_object **blob, { const struct got_error *err; struct got_object *obj; + + *blob = NULL; err = got_object_open(&obj, repo, id); if (err)