##// END OF EJS Templates
mpatch: Fix for malloc corner case on AIX
Matt Mackall -
r3138:cc856c4d default
parent child Browse files
Show More
@@ -62,6 +62,9 b' static struct flist *lalloc(int size)'
62 {
62 {
63 struct flist *a = NULL;
63 struct flist *a = NULL;
64
64
65 if (size < 1)
66 size = 1;
67
65 a = (struct flist *)malloc(sizeof(struct flist));
68 a = (struct flist *)malloc(sizeof(struct flist));
66 if (a) {
69 if (a) {
67 a->base = (struct frag *)malloc(sizeof(struct frag) * size);
70 a->base = (struct frag *)malloc(sizeof(struct frag) * size);
General Comments 0
You need to be logged in to leave comments. Login now