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

Commit4b85a7c

Browse files
author
Maxim Orlov
committed
Issue#27: Fix list remove generic algo.
1 parent20f4ef3 commit4b85a7c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎pg_variables.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ HtabToStat_remove_if(List **l, void *value,
226226
/*
227227
* See https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=1cff1b95ab6ddae32faa3efe0d95a820dbfdc164
228228
*
229-
* Version > 13 have different lists interface.
229+
* Version >= 13 have different lists interface.
230230
*/
231231
ListCell*cell;
232232
HtabToStat*entry=NULL;
@@ -236,7 +236,14 @@ HtabToStat_remove_if(List **l, void *value,
236236
entry= (HtabToStat*)lfirst(cell);
237237

238238
if (eq(entry,value))
239+
{
239240
*l=foreach_delete_current(*l,cell);
241+
pfree(entry->status);
242+
pfree(entry);
243+
244+
if (match_first)
245+
return;
246+
}
240247
}
241248
#endif
242249
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp