Content-Length: 262588 | pFad | http://github.com/postgrespro/postgres_cluster/commit/4faf074a53bb8e8e03714ce2746b9d11a95dc6e5

5B libpq: Fix memory leak in URI parser · postgrespro/postgres_cluster@4faf074 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/4faf074a53bb8e8e03714ce2746b9d11a95dc6e5

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy