mirror of
https://github.com/pocketpy/pocketpy
synced 2026-05-06 10:13:37 +00:00
fix(debugger): prevent memory leak in DAP setBreakpoints error path
This commit is contained in:
parent
973bbdfea4
commit
b99d18a9f6
@ -115,6 +115,7 @@ void c11_dap_handle_setBreakpoints(py_Ref arguments, c11_sbuf* buffer) {
|
||||
const char* sourcename = c11_strdup(py_tostr(py_retval()));
|
||||
if(!py_smarteval("[bp['line'] for bp in _0['breakpoints']]", NULL, arguments)) {
|
||||
py_printexc();
|
||||
PK_FREE((void*)sourcename);
|
||||
return;
|
||||
}
|
||||
int bp_numbers = c11_debugger_reset_breakpoints_by_source(sourcename);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user