2007-08-10 Michael Snyder * completer.c (location_completer): Must free 'fn_list', except in the one case where it is returned (as 'list'). Index: completer.c =================================================================== RCS file: /cvs/src/src/gdb/completer.c,v retrieving revision 1.19 diff -p -r1.19 completer.c *** completer.c 10 Aug 2007 20:35:09 -0000 1.19 --- completer.c 10 Aug 2007 22:39:05 -0000 *************** location_completer (char *text, char *wo *** 281,287 **** list = make_symbol_completion_list (symbol_start, word); /* If text includes characters which cannot appear in a file name, they cannot be asking for completion on files. */ ! if (strcspn (text, gdb_completer_file_name_break_characters) == text_len) fn_list = make_source_files_completion_list (text, text); } --- 281,288 ---- list = make_symbol_completion_list (symbol_start, word); /* If text includes characters which cannot appear in a file name, they cannot be asking for completion on files. */ ! if (strcspn (text, ! gdb_completer_file_name_break_characters) == text_len) fn_list = make_source_files_completion_list (text, text); } *************** location_completer (char *text, char *wo *** 331,337 **** --- 332,341 ---- /* No completions at all. As the final resort, try completing on the entire text as a symbol. */ list = make_symbol_completion_list (orig_text, word); + xfree (fn_list); } + else + xfree (fn_list); return list; }