Skip to content

Commit 495e2b2

Browse files
committed
Try something random
1 parent caceea9 commit 495e2b2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/zone.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static int32_t open_file(
216216
return ZONE_READ_ERROR;
217217
}
218218

219-
if (!(file->buffer.data = malloc(ZONE_WINDOW_SIZE + 1)))
219+
if (!(file->buffer.data = malloc(ZONE_WINDOW_SIZE + ZONE_PADDING_SIZE + 1)))
220220
return ZONE_OUT_OF_MEMORY;
221221

222222
file->buffer.data[0] = '\0';
@@ -261,20 +261,20 @@ void zone_close_file(
261261

262262
assert(!is_string || !file->handle);
263263

264-
if (file->buffer.data && !is_string)
265-
free(file->buffer.data);
264+
// if (file->buffer.data && !is_string)
265+
// free(file->buffer.data);
266266
file->buffer.data = NULL;
267-
if (file->name && file->name != not_a_file)
268-
free((char *)file->name);
267+
// if (file->name && file->name != not_a_file)
268+
// free((char *)file->name);
269269
file->name = NULL;
270-
if (file->path && file->path != not_a_file)
271-
free((char *)file->path);
270+
// if (file->path && file->path != not_a_file)
271+
// free((char *)file->path);
272272
file->path = NULL;
273273
if (file->handle)
274274
(void)fclose(file->handle);
275275
file->handle = NULL;
276-
if (file != &parser->first)
277-
free(file);
276+
// if (file != &parser->first)
277+
// free(file);
278278
}
279279

280280
nonnull_all

0 commit comments

Comments
 (0)