mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #2646 from cremno/mrdb-fix-memory-leaks
mrdb: fix two memory leaks
This commit is contained in:
@@ -197,6 +197,9 @@ mrb_debug_get_source(mrb_state *mrb, mrdb_state *mrdb, const char *srcpath, cons
|
||||
fclose(fp);
|
||||
break;
|
||||
}
|
||||
|
||||
mrb_free(mrb, (void *)search_path[1]);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
|
||||
@@ -215,6 +215,7 @@ void
|
||||
mrb_debug_context_free(mrb_state *mrb)
|
||||
{
|
||||
if (_debug_context) {
|
||||
mrb_debug_delete_break_all(mrb, _debug_context);
|
||||
mrb_free(mrb, _debug_context);
|
||||
_debug_context = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user