X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=blob.c;h=3d99b93f020d84c5410c2b1056f2d7446b647d1e;hb=b0fe89caeb0c37405874bad66702f49ff4977972;hp=35031af62bbcf61a59edf22f3502ec62e3bb2765;hpb=b51ad4314078298194d23d46e2b4473ffd32a88a;p=git.git diff --git a/blob.c b/blob.c index 35031af6..3d99b93f 100644 --- a/blob.c +++ b/blob.c @@ -8,11 +8,10 @@ struct blob *lookup_blob(unsigned char *sha1) { struct object *obj = lookup_object(sha1); if (!obj) { - struct blob *ret = malloc(sizeof(struct blob)); + struct blob *ret = xmalloc(sizeof(struct blob)); memset(ret, 0, sizeof(struct blob)); created_object(sha1, &ret->object); ret->object.type = blob_type; - ret->object.parsed = 1; return ret; } if (obj->parsed && obj->type != blob_type) {