mercurial/mpatch.c
changeset 282 97d83e7fbf2f
parent 128 d6afb6dbf9f2
child 384 a29decbf7475
equal deleted inserted replaced
281:574420507d8c 282:97d83e7fbf2f
    42 	struct flist *a = NULL;
    42 	struct flist *a = NULL;
    43 
    43 
    44 	a = malloc(sizeof(struct flist));
    44 	a = malloc(sizeof(struct flist));
    45 	if (a) {
    45 	if (a) {
    46 		a->base = malloc(sizeof(struct frag) * size);
    46 		a->base = malloc(sizeof(struct frag) * size);
    47 		if (!a->base)
    47 		if (!a->base) {
    48 			free(a);
    48 			free(a);
    49 		else
    49 			a = NULL;
       
    50 		} else
    50 			a->head = a->tail = a->base;
    51 			a->head = a->tail = a->base;
    51 	}
    52 	}
    52 	return a;
    53 	return a;
    53 }
    54 }
    54 
    55