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

Commit77a436b

Browse files
committed
Fix seriously nasty memory leak in new TransactionIdIsInProgress code.
1 parent573a71a commit77a436b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

‎src/backend/storage/ipc/sinval.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/storage/ipc/sinval.c,v 1.65 2004/07/0100:50:52 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/ipc/sinval.c,v 1.66 2004/07/0103:13:05 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -509,7 +509,6 @@ TransactionIdIsInProgress(TransactionId xid)
509509

510510
if (result)
511511
break;
512-
513512
}
514513
}
515514

@@ -531,12 +530,18 @@ TransactionIdIsInProgress(TransactionId xid)
531530
* We don't care if it aborted, because if it did, we won't find
532531
* it in the array.
533532
*/
534-
535533
for (i=0;i<nxids;i++)
534+
{
536535
if (TransactionIdEquals(xids[i],xid))
537-
return true;
536+
{
537+
result= true;
538+
break;
539+
}
540+
}
538541
}
539542

543+
pfree(xids);
544+
540545
returnresult;
541546
}
542547

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp