Show More
@@ -220,7 +220,10 b' static void execcmdserver(const struct c' | |||
|
220 | 220 | |
|
221 | 221 | const char **argv = mallocx(sizeof(char *) * argsize); |
|
222 | 222 | memcpy(argv, baseargv, sizeof(baseargv)); |
|
223 | memcpy(argv + baseargvsize, opts->args, sizeof(char *) * opts->argsize); | |
|
223 | if (opts->args) { | |
|
224 | size_t size = sizeof(char *) * opts->argsize; | |
|
225 | memcpy(argv + baseargvsize, opts->args, size); | |
|
226 | } | |
|
224 | 227 | argv[argsize - 1] = NULL; |
|
225 | 228 | |
|
226 | 229 | if (putenv("CHGINTERNALMARK=") != 0) |
@@ -155,12 +155,8 b' cleanup:' | |||
|
155 | 155 | PyEval_RestoreThread(_save); |
|
156 | 156 | PyBuffer_Release(&ba); |
|
157 | 157 | PyBuffer_Release(&bb); |
|
158 |
|
|
|
159 |
|
|
|
160 | } | |
|
161 | if (bl) { | |
|
162 | free(bl); | |
|
163 | } | |
|
158 | free(al); | |
|
159 | free(bl); | |
|
164 | 160 | if (l.next) { |
|
165 | 161 | bdiff_freehunks(l.next); |
|
166 | 162 | } |
@@ -185,15 +185,13 b' static void lazymanifest_dealloc(lazyman' | |||
|
185 | 185 | { |
|
186 | 186 | /* free any extra lines we had to allocate */ |
|
187 | 187 | int i; |
|
188 | for (i = 0; i < self->numlines; i++) { | |
|
188 | for (i = 0; self->lines && (i < self->numlines); i++) { | |
|
189 | 189 | if (self->lines[i].from_malloc) { |
|
190 | 190 | free(self->lines[i].start); |
|
191 | 191 | } |
|
192 | 192 | } |
|
193 |
|
|
|
194 |
|
|
|
195 | self->lines = NULL; | |
|
196 | } | |
|
193 | free(self->lines); | |
|
194 | self->lines = NULL; | |
|
197 | 195 | if (self->pydata) { |
|
198 | 196 | Py_DECREF(self->pydata); |
|
199 | 197 | self->pydata = NULL; |
General Comments 0
You need to be logged in to leave comments.
Login now