* cli/cli-cmds.c (apropos_command): Free the compiled regex. Use

get_regcomp_error.
	* utils.c: Include gdb_regex.h.
	(do_regfree_cleanup): New function.
	(make_regfree_cleanup): Likewise.
	(get_regcomp_error): Likewise.
	* gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Declare.
This commit is contained in:
Tom Tromey 2011-01-17 16:50:42 +00:00
parent da17376b70
commit dc92e16124
4 changed files with 60 additions and 6 deletions

View file

@ -28,4 +28,8 @@
# include <regex.h>
#endif
/* From utils.c. */
struct cleanup *make_regfree_cleanup (regex_t *);
char *get_regcomp_error (int, regex_t *);
#endif /* not GDB_REGEX_H */