diff --git a/3rd/lua/lstring.c b/3rd/lua/lstring.c index 7e3f95a6..7c77dba6 100644 --- a/3rd/lua/lstring.c +++ b/3rd/lua/lstring.c @@ -295,6 +295,8 @@ static struct shrmap_slot * shrstr_newpage(int sz) { int i; struct shrmap_slot * s = (struct shrmap_slot *)malloc(sz * sizeof(*s)); + if (s == NULL) + return NULL; for (i=0;ilock); int succ = shrstr_allocpage(s, osz, sz, newpage); rwlock_wunlock(&s->lock);