fix(debugger): prevent memory leak in DAP setBreakpoints error path

This commit is contained in:
Nikhil Goyal 2026-04-21 01:18:37 +05:30 committed by Nikhil Goyal
parent 973bbdfea4
commit b99d18a9f6

View File

@ -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);