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

Commiteabf98e

Browse files
committed
simplehash: Free collisions array in SH_STAT
While SH_STAT() is only used for debugging, the allocated array can be large,and therefore should be freed.It's unclear why coverity started warning now.Reported-by: Tom Lane <tgl@sss.pgh.pa.us>Reported-by: CoverityDiscussion:https://postgr.es/m/3005248.1712538233@sss.pgh.pa.usBackpatch: 12-
1 parent5fe7bcc commiteabf98e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/include/lib/simplehash.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,9 @@ SH_STAT(SH_TYPE * tb)
977977
max_collisions=curcoll;
978978
}
979979

980+
/* large enough to be worth freeing, even if just used for debugging */
981+
pfree(collisions);
982+
980983
if (tb->members>0)
981984
{
982985
fillfactor=tb->members / ((double)tb->size);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp