[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#58596: 29.0.50; [PATCH] Fix memory leak when loading Tree-sitter lan
From: |
Daniel Martín |
Subject: |
bug#58596: 29.0.50; [PATCH] Fix memory leak when loading Tree-sitter language definitions |
Date: |
Tue, 18 Oct 2022 00:54:57 +0200 |
I'm instrumenting the Tree-sitter branch to make sure there's no glaring
memory issues like leaks or undefined behavior. I've found that the
function treesit_load_language leaks a few bytes each time a language is
loaded.
To fix the bug, I've simplified a bit the logic that loads the dynamic
library, to avoid the string duplication that was leaking, and removed a
loop that I think it's not really necessary (that'll save us a few CPU
cycles).
Please check that I've not made any crucial mistake, and feel free to
merge it if you think it's a good patch.
Thanks.
0001-Fix-memory-leak-when-loading-Tree-sitter-language-de.patch
Description: Text Data
- bug#58596: 29.0.50; [PATCH] Fix memory leak when loading Tree-sitter language definitions,
Daniel Martín <=