projects
/
users
/
rhaas
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13a8678
)
Fix memory leak in tab completion.
author
Tom Lane
<tgl@sss.pgh.pa.us>
Thu, 20 Oct 2011 19:44:21 +0000
(15:44 -0400)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Thu, 20 Oct 2011 19:44:21 +0000
(15:44 -0400)
This was introduced in commit
e49ad77ff958b380ea6fa08c72e2dce97ac56c6b
.
Fixed in another, more future-proof way in HEAD.
src/bin/psql/tab-complete.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/psql/tab-complete.c
b/src/bin/psql/tab-complete.c
index 32f418306cd2423deb5030b988f500b7ee173029..a5a035fcc5929aaec1e1042fce5e15c511a20ac0 100644
(file)
--- a/
src/bin/psql/tab-complete.c
+++ b/
src/bin/psql/tab-complete.c
@@
-755,7
+755,7
@@
psql_completion(char *text, int start, int end)
completion_info_charp2 = NULL;
/*
- * Scan the input line before our current position for the last
five
+ * Scan the input line before our current position for the last
six
* words. According to those we'll make some smart decisions on what the
* user is probably intending to type. TODO: Use strtokx() to do this.
*/
@@
-2922,6
+2922,7
@@
psql_completion(char *text, int start, int end)
free(prev3_wd);
free(prev4_wd);
free(prev5_wd);
+ free(prev6_wd);
/* Return our Grand List O' Matches */
return matches;