X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=object.c;h=91bbc6e5e2eadfb0a66b14d992eac260d07267f8;hb=77eb2720460a3061ecdf3456d96a7093565fb4e9;hp=cfa2337641aabd692c659eabef347be11af9f517;hpb=b51ad4314078298194d23d46e2b4473ffd32a88a;p=git.git diff --git a/object.c b/object.c index cfa23376..91bbc6e5 100644 --- a/object.c +++ b/object.c @@ -52,7 +52,7 @@ void created_object(unsigned char *sha1, struct object *obj) if (obj_allocs == nr_objs) { obj_allocs = alloc_nr(obj_allocs); - objs = realloc(objs, obj_allocs * sizeof(struct object *)); + objs = xrealloc(objs, obj_allocs * sizeof(struct object *)); } /* Insert it into the right place */ @@ -75,7 +75,7 @@ void add_ref(struct object *refer, struct object *target) } target->used = 1; - p = malloc(sizeof(*p)); + p = xmalloc(sizeof(*p)); p->item = target; p->next = NULL; *pp = p;