##// END OF EJS Templates
mpatch: properly NULL out return in lalloc...
mpm@selenic.com -
r282:97d83e7f default
parent child Browse files
Show More
@@ -44,9 +44,10 b' static struct flist *lalloc(int size)'
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;
General Comments 0
You need to be logged in to leave comments. Login now