diff --git a/src/global.c b/src/global.c index 0617728a..7465e0e7 100644 --- a/src/global.c +++ b/src/global.c @@ -1220,8 +1220,10 @@ void thanks_for_all_the_fish(void) syntaxes->extensions = bob->next; free(bob->ext_regex); - regfree(bob->ext); - free(bob->ext); + if (bob->ext != NULL) { + regfree(bob->ext); + free(bob->ext); + } free(bob); } while (syntaxes->color != NULL) { diff --git a/src/winio.c b/src/winio.c index f1f91c7e..8b19ffb9 100644 --- a/src/winio.c +++ b/src/winio.c @@ -3907,7 +3907,7 @@ void do_cursorpos(bool constant) /* Check whether totsize is correct. If it isn't, there is a bug * somewhere. */ - assert(openfile->current != openfile->filebot || i == totsize); + assert(openfile->current != openfile->filebot || i == openfile->totsize); if (constant && disable_cursorpos) { disable_cursorpos = FALSE;