Skip to content

Commit 4faf074

Browse files
committed
libpq: Fix memory leak in URI parser
When an invalid query parameter is reported, some memory leaks. found by Coverity
1 parent ec8a013 commit 4faf074

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4879,6 +4879,11 @@ conninfo_uri_parse_params(char *params,
48794879
libpq_gettext(
48804880
"invalid URI query parameter: \"%s\"\n"),
48814881
keyword);
4882+
if (malloced)
4883+
{
4884+
free(keyword);
4885+
free(value);
4886+
}
48824887
return false;
48834888
}
48844889
if (malloced)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy