mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03: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:
@ -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)
|
||||
|
Reference in New Issue
Block a user