]> git.eshelyaron.com Git - emacs.git/commit
Fix crash on MS-Windows due to memory-allocation problem in treesit.c
authorEli Zaretskii <eliz@gnu.org>
Sun, 13 Nov 2022 08:51:42 +0000 (10:51 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sun, 13 Nov 2022 08:51:42 +0000 (10:51 +0200)
commit3a5c4bdc0c079f72bad98e01f70343ba9e9b0043
treeed93e41acadd9e13d2dba0aa329ff1b4e4472ca4
parent908aab6144bf9f62dd5b2c2f1776ed177fa6d18f
Fix crash on MS-Windows due to memory-allocation problem in treesit.c

* src/treesit.c (treesit_load_language): Use 'xstrdup'/'xfree'
instead of 'strdup'/'free', to prevent crashes on MS-Windows,
where we must use our own implementation of 'malloc'/'free',
whereas 'strdup' uses the default implementation in the MS-Windows
C runtime library.
src/treesit.c