projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec8a013
)
libpq: Fix memory leak in URI parser
author
Peter Eisentraut
<peter_e@gmx.net>
Fri, 24 Aug 2012 02:33:04 +0000
(22:33 -0400)
committer
Peter Eisentraut
<peter_e@gmx.net>
Fri, 24 Aug 2012 02:33:04 +0000
(22:33 -0400)
When an invalid query parameter is reported, some memory leaks.
found by Coverity
src/interfaces/libpq/fe-connect.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/libpq/fe-connect.c
b/src/interfaces/libpq/fe-connect.c
index adaab7aaade60a980b7eaf5b6e9734444c72b930..3dcd0c3f9c09ec06144c040cc333e382b9d7f78b 100644
(file)
--- a/
src/interfaces/libpq/fe-connect.c
+++ b/
src/interfaces/libpq/fe-connect.c
@@
-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)