mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-25 03:06:11 +08:00
2011-02-27 Michael Snyder <msnyder@vmware.com>
* python/py-breakpoint.c (bppy_get_commands): Fix memory leak.
This commit is contained in:
@ -489,12 +489,12 @@ bppy_get_commands (PyObject *self, void *closure)
|
||||
print_command_lines (uiout, breakpoint_commands (bp), 0);
|
||||
}
|
||||
ui_out_redirect (uiout, NULL);
|
||||
cmdstr = ui_file_xstrdup (string_file, &length);
|
||||
GDB_PY_HANDLE_EXCEPTION (except);
|
||||
|
||||
cmdstr = ui_file_xstrdup (string_file, &length);
|
||||
make_cleanup (xfree, cmdstr);
|
||||
result = PyString_Decode (cmdstr, strlen (cmdstr), host_charset (), NULL);
|
||||
do_cleanups (chain);
|
||||
xfree (cmdstr);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user