Merge pull request #6280 from taosdata/feature/TD-4384
[TD-4384]<fix>: fixed an uninitialized bug
This commit is contained in:
commit
647bb54bfc
|
@ -237,6 +237,11 @@ void httpFreeMultiCmds(HttpContext *pContext) {
|
||||||
JsonBuf *httpMallocJsonBuf(HttpContext *pContext) {
|
JsonBuf *httpMallocJsonBuf(HttpContext *pContext) {
|
||||||
if (pContext->jsonBuf == NULL) {
|
if (pContext->jsonBuf == NULL) {
|
||||||
pContext->jsonBuf = (JsonBuf *)malloc(sizeof(JsonBuf));
|
pContext->jsonBuf = (JsonBuf *)malloc(sizeof(JsonBuf));
|
||||||
|
if (pContext->jsonBuf == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(pContext->jsonBuf, 0, sizeof(JsonBuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pContext->jsonBuf->pContext) {
|
if (!pContext->jsonBuf->pContext) {
|
||||||
|
|
Loading…
Reference in New Issue