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

Commitedf12e7

Browse files
committed
Fix memory leak for hashing with nondeterministic collations.
Backpatch through 12, where nondeterministic collations wereintroduced (5e1963f).Backpatch-through: 12
1 parenta109a0b commitedf12e7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

‎src/backend/access/hash/hashfunc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ hashtext(PG_FUNCTION_ARGS)
303303
buf=palloc(bsize);
304304
ucol_getSortKey(mylocale->info.icu.ucol,
305305
uchar,ulen,buf,bsize);
306+
pfree(uchar);
306307

307308
result=hash_any(buf,bsize);
308309

@@ -360,6 +361,7 @@ hashtextextended(PG_FUNCTION_ARGS)
360361
buf=palloc(bsize);
361362
ucol_getSortKey(mylocale->info.icu.ucol,
362363
uchar,ulen,buf,bsize);
364+
pfree(uchar);
363365

364366
result=hash_any_extended(buf,bsize,PG_GETARG_INT64(1));
365367

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,7 @@ hashbpchar(PG_FUNCTION_ARGS)
10311031
buf=palloc(bsize);
10321032
ucol_getSortKey(mylocale->info.icu.ucol,
10331033
uchar,ulen,buf,bsize);
1034+
pfree(uchar);
10341035

10351036
result=hash_any(buf,bsize);
10361037

@@ -1092,6 +1093,7 @@ hashbpcharextended(PG_FUNCTION_ARGS)
10921093
buf=palloc(bsize);
10931094
ucol_getSortKey(mylocale->info.icu.ucol,
10941095
uchar,ulen,buf,bsize);
1096+
pfree(uchar);
10951097

10961098
result=hash_any_extended(buf,bsize,PG_GETARG_INT64(1));
10971099

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp