mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +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(
|
libpq_gettext(
|
||||||
"invalid URI query parameter: \"%s\"\n"),
|
"invalid URI query parameter: \"%s\"\n"),
|
||||||
keyword);
|
keyword);
|
||||||
|
if (malloced)
|
||||||
|
{
|
||||||
|
free(keyword);
|
||||||
|
free(value);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (malloced)
|
if (malloced)
|
||||||
|
Reference in New Issue
Block a user