diff options
Diffstat (limited to 'lua_cjson.c')
-rw-r--r-- | lua_cjson.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lua_cjson.c b/lua_cjson.c index 363466c..ae178eb 100644 --- a/lua_cjson.c +++ b/lua_cjson.c | |||
@@ -457,6 +457,10 @@ static void json_create_config(lua_State *l) | |||
457 | int i; | 457 | int i; |
458 | 458 | ||
459 | cfg = lua_newuserdata(l, sizeof(*cfg)); | 459 | cfg = lua_newuserdata(l, sizeof(*cfg)); |
460 | if (!cfg) | ||
461 | abort(); | ||
462 | |||
463 | memset(cfg, 0, sizeof(*cfg)); | ||
460 | 464 | ||
461 | /* Create GC method to clean up strbuf */ | 465 | /* Create GC method to clean up strbuf */ |
462 | lua_newtable(l); | 466 | lua_newtable(l); |