cJSON_Print会申请内存,使用完后一定要free掉。 char* pstr = cJSON_Print(json); ... free(pstr); pstr = NULL; 血的教训。。。。。。