From 9cf45fc40d634461297403c49a0e60015ef577b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Thu, 10 Apr 2014 21:56:07 +0000 Subject: [PATCH] [INTERPRETER] * BUG: Fix memory leak with Lower$() and Upper$() on some null strings. git-svn-id: svn://localhost/gambas/trunk@6241 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- main/gbx/gbx_subr_string.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/gbx/gbx_subr_string.c b/main/gbx/gbx_subr_string.c index 39fdd04c2..031d73732 100644 --- a/main/gbx/gbx_subr_string.c +++ b/main/gbx/gbx_subr_string.c @@ -371,7 +371,9 @@ void SUBR_upper(ushort code) SUBR_ENTER_PARAM(1); if (SUBR_check_string(PARAM)) - STRING_void_value(&SP[-1]); + { + VOID_STRING(&SP[-1]); + } else { len = PARAM->_string.len;