Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita03b3b6

Browse files
committed
Avoid potential UCollator leak for older ICU versions.
ICU versions 53 and earlier rely on icu_set_collation_attributes() toprocess the attributes in the locale string. Avoid leaking thealready-opened UCollator object if an error is encountered.Discussion:https://postgr.es/m/04182066-7655-344a-b8b7-040b1b2490fb%40enterprisedb.comReviewed-by: Peter Eisentraut
1 parent9a24289 commita03b3b6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/backend/utils/adt/pg_locale.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2810,9 +2810,12 @@ icu_set_collation_attributes(UCollator *collator, const char *loc)
28102810
* message across ICU versions.
28112811
*/
28122812
if (U_FAILURE(status))
2813+
{
2814+
ucol_close(collator);
28132815
ereport(ERROR,
28142816
(errmsg("could not open collator for locale \"%s\": %s",
28152817
loc,u_errorName(status))));
2818+
}
28162819
}
28172820
}
28182821

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp