diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-10-20 15:44:21 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-10-20 15:44:21 -0400 |
commit | 790fa1fdd8bb32e2e9055dd47d76c2382c51c84a (patch) | |
tree | 5f304188461f860450760aa0c6b171f40ad287fc | |
parent | 13a867825a0aafb7f9b417cc4e52cd5d8988eabc (diff) | |
download | postgresql-790fa1fdd8bb32e2e9055dd47d76c2382c51c84a.tar.gz postgresql-790fa1fdd8bb32e2e9055dd47d76c2382c51c84a.zip |
Fix memory leak in tab completion.
This was introduced in commit e49ad77ff958b380ea6fa08c72e2dce97ac56c6b.
Fixed in another, more future-proof way in HEAD.
-rw-r--r-- | src/bin/psql/tab-complete.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 32f418306cd..a5a035fcc59 100644 --- 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; |