summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-07-03 15:05:29 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-07-03 15:05:29 +0900
commite690e1e877f33cda815e4f8771208dda68def296 (patch)
treef0d4e338ec60b4a5a7000a15571b69fb3ae1068f
parent1dbb2b74d344f409c03c36a6dc831a647602cf0a (diff)
parenta4f63caa7947c049ad310e9e5016404b377ebe6e (diff)
downloadmruby-e690e1e877f33cda815e4f8771208dda68def296.tar.gz
mruby-e690e1e877f33cda815e4f8771208dda68def296.zip
Merge pull request #2871 from archSeer/patch-2
Fix incorrect memory allocation of mrdb_state_new.
-rwxr-xr-xmrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c b/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
index da235fad8..3e43fdb4a 100755
--- a/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
+++ b/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
@@ -222,9 +222,9 @@ mrb_debug_context_free(mrb_state *mrb)
static mrdb_state*
mrdb_state_new(mrb_state *mrb)
{
- mrdb_state *mrdb = mrb_malloc(mrb, sizeof(mrb_state));
+ mrdb_state *mrdb = mrb_malloc(mrb, sizeof(mrdb_state));
- memset(mrdb, 0, sizeof(mrb_state));
+ memset(mrdb, 0, sizeof(mrdb_state));
mrdb->dbg = mrb_debug_context_get(mrb);
mrdb->command = mrb_malloc(mrb, MAX_COMMAND_LINE+1);