Merge pull request #2646 from cremno/mrdb-fix-memory-leaks

mrdb: fix two memory leaks
This commit is contained in:
Hiroshi Mimaki
2014-11-25 14:16:42 +09:00
2 changed files with 4 additions and 0 deletions
@@ -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;
}