Merge branch 'check_for_null' of https://github.com/Luflosi/kitty

This commit is contained in:
Kovid Goyal 2019-02-23 15:19:32 +05:30
commit bf2c50b58b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -204,6 +204,7 @@ match(PyObject *self, PyObject *args) {
opts.delimiter_sz = copy_unicode_object(delimiter, opts.delimiter, arraysz(opts.delimiter));
size_t num_lines = PyList_GET_SIZE(lines);
char **clines = malloc(sizeof(char*) * num_lines);
if (!clines) { return PyErr_NoMemory(); }
size_t *sizes = malloc(sizeof(size_t) * num_lines);
if (!sizes) { return PyErr_NoMemory(); }
for (size_t i = 0; i < num_lines; i++) {