Mercurial > hg > pyhgsh
comparison mercurial/mpatch.c @ 2083:345107e167a0
merge 0.8.1 with revlogng
author | Chris Mason <mason@suse.com> |
---|---|
date | Sat, 08 Apr 2006 20:10:46 -0400 |
parents | 441ea218414e 8f9660c568b8 |
children |
comparison
equal
deleted
inserted
replaced
2082:856f0ba200bc | 2083:345107e167a0 |
---|---|
59 struct flist *a = NULL; | 59 struct flist *a = NULL; |
60 | 60 |
61 a = (struct flist *)malloc(sizeof(struct flist)); | 61 a = (struct flist *)malloc(sizeof(struct flist)); |
62 if (a) { | 62 if (a) { |
63 a->base = (struct frag *)malloc(sizeof(struct frag) * size); | 63 a->base = (struct frag *)malloc(sizeof(struct frag) * size); |
64 if (!a->base) { | 64 if (a->base) { |
65 free(a); | |
66 a = NULL; | |
67 } else | |
68 a->head = a->tail = a->base; | 65 a->head = a->tail = a->base; |
69 return a; | 66 return a; |
67 } | |
68 free(a); | |
69 a = NULL; | |
70 } | 70 } |
71 if (!PyErr_Occurred()) | 71 if (!PyErr_Occurred()) |
72 PyErr_NoMemory(); | 72 PyErr_NoMemory(); |
73 return NULL; | 73 return NULL; |
74 } | 74 } |