Module: wine Branch: master Commit: 9bb0dbc1e2687ae5cdfc65ebcc0891943f09518b URL: https://gitlab.winehq.org/wine/wine/-/commit/9bb0dbc1e2687ae5cdfc65ebcc08919...
Author: Gabriel Ivăncescu gabrielopcode@gmail.com Date: Thu Jul 6 19:57:51 2023 +0300
mshtml: Fix leak in find_prev_space.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com
---
dlls/mshtml/range.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/range.c b/dlls/mshtml/range.c index 5bd6a8414cb..89b1eecb8cb 100644 --- a/dlls/mshtml/range.c +++ b/dlls/mshtml/range.c @@ -741,8 +741,10 @@ static LONG find_prev_space(rangepoint_t *iter, BOOL first_space)
init_rangepoint(&prev, iter->node, iter->off); c = move_prev_char(&prev); - if(!c || (first_space && iswspace(c))) + if(!c || (first_space && iswspace(c))) { + free_rangepoint(&prev); return FALSE; + }
do { free_rangepoint(iter);