mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 06:25:30 +00:00
ICU-21809 Possible memory leak of tempTable.resFlags
This commit is contained in:
parent
8f6ba2a7a5
commit
f48944e062
1 changed files with 6 additions and 0 deletions
|
@ -1457,6 +1457,9 @@ ures_swap(const UDataSwapper *ds,
|
|||
outBundle+keysBottom, pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "ures_swap().udata_swapInvStringBlock(keys[%d]) failed\n", 4*(keysTop-keysBottom));
|
||||
if(tempTable.resFlags!=stackResFlags) {
|
||||
uprv_free(tempTable.resFlags);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1465,6 +1468,9 @@ ures_swap(const UDataSwapper *ds,
|
|||
ds->swapArray16(ds, inBundle+keysTop, (resBottom-keysTop)*4, outBundle+keysTop, pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "ures_swap().swapArray16(16-bit units[%d]) failed\n", 2*(resBottom-keysTop));
|
||||
if(tempTable.resFlags!=stackResFlags) {
|
||||
uprv_free(tempTable.resFlags);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue