mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
libpq: Fix memory leak in URI parser
When an invalid query parameter is reported, some memory leaks. found by Coverity
This commit is contained in:
parent
ec8a0135c3
commit
4faf074a53
@ -4879,6 +4879,11 @@ conninfo_uri_parse_params(char *params,
|
||||
libpq_gettext(
|
||||
"invalid URI query parameter: \"%s\"\n"),
|
||||
keyword);
|
||||
if (malloced)
|
||||
{
|
||||
free(keyword);
|
||||
free(value);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (malloced)
|
||||
|
Loading…
Reference in New Issue
Block a user