merge in master

This commit is contained in:
ben 2016-04-27 08:20:54 -05:00
commit 86e0099835

View file

@ -323,7 +323,7 @@ jsonparse(char *s)
memset(&l, 0, sizeof(l));
l.s = s;
l.slen = strlen(s);
if((l.buf = mallocz(l.slen+1, 1)) == nil)
if((l.buf = mallocz(l.slen+UTFmax+1, 1)) == nil)
return nil;
j = jsonobj(&l);
@ -336,6 +336,8 @@ jsonfree(JSON *j)
{
JSONEl *e, *f;
if(j == nil)
return;
switch(j->t){
case JSONString:
if(j->s)