Skip to content

Commit 94a2b3a

Browse files
Tobias VorwachsToBee94
authored andcommitted
mbstring: fix memory leak at updating current_detect_order_list
1 parent 8a388a8 commit 94a2b3a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext/mbstring/mbstring.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5984,6 +5984,11 @@ static void php_mb_populate_current_detect_order_list(void)
59845984
entry[i] = mbfl_no2encoding(src[i]);
59855985
}
59865986
}
5987+
5988+
if (MBSTRG(current_detect_order_list) != NULL) {
5989+
efree(ZEND_VOIDP(MBSTRG(current_detect_order_list)));
5990+
}
5991+
59875992
MBSTRG(current_detect_order_list) = entry;
59885993
MBSTRG(current_detect_order_list_size) = nentries;
59895994
}

0 commit comments

Comments
 (0)