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

Commit41820e6

Browse files
committed
Fix memory leak in connection string validation.
Introduced in commitc3afe8c.Discussion:https://postgr.es/m/066a65233d3cb4ea27a9e0778d2f1d0dc764b222.camel@j-davis.comReviewed-by: Nathan Bossart, Tom LaneBackpatch-through: 16
1 parent4c03ac7 commit41820e6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/backend/replication/libpqwalreceiver/libpqwalreceiver.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,15 @@ libpqrcv_check_conninfo(const char *conninfo, bool must_use_password)
284284
}
285285

286286
if (!uses_password)
287+
{
288+
/* malloc'd, so we must free it explicitly */
289+
PQconninfoFree(opts);
290+
287291
ereport(ERROR,
288292
(errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
289293
errmsg("password is required"),
290294
errdetail("Non-superusers must provide a password in the connection string.")));
295+
}
291296
}
292297

293298
PQconninfoFree(opts);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp