diff --git a/components/protocomm/src/common/protocomm.c b/components/protocomm/src/common/protocomm.c index e55ad7b890..31007711f4 100644 --- a/components/protocomm/src/common/protocomm.c +++ b/components/protocomm/src/common/protocomm.c @@ -378,7 +378,7 @@ static int protocomm_version_handler(uint32_t session_id, /* Output is a non null terminated string with length specified */ *outlen = strlen(pc->ver); *outbuf = malloc(*outlen); - if (outbuf == NULL) { + if (*outbuf == NULL) { ESP_LOGE(TAG, "Failed to allocate memory for version response"); return ESP_ERR_NO_MEM; }