X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=server-info.c;h=f9be5a7f60c1cc5208e7c91367ecb28014106f18;hb=fa2e71c9e794c43634670b62d1b4bf58d1ae7e60;hp=7667b412576644ee5f428658df6db32efc37f0c3;hpb=cb5d709ff8a4bae19d57a470ba2b137c25938a44;p=git.git diff --git a/server-info.c b/server-info.c index 7667b4125..f9be5a7f6 100644 --- a/server-info.c +++ b/server-info.c @@ -7,9 +7,11 @@ /* refs */ static FILE *info_ref_fp; -static int add_info_ref(const char *path, const unsigned char *sha1, void *cb_data) +static int add_info_ref(const char *path, const unsigned char *sha1, int flag, void *cb_data) { struct object *o = parse_object(sha1); + if (!o) + return -1; fprintf(info_ref_fp, "%s %s\n", sha1_to_hex(sha1), path); if (o->type == OBJ_TAG) {