Browse Source

Merge branch 'fix/esp_tls_typo_v4.0' into 'release/v4.0'

Fix/protocom_null_check(v4.0)

See merge request espressif/esp-idf!12633
Mahavir Jain 4 years ago
parent
commit
772c48041d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      components/protocomm/src/common/protocomm.c

+ 1 - 1
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 */
     /* Output is a non null terminated string with length specified */
     *outlen = strlen(pc->ver);
     *outlen = strlen(pc->ver);
     *outbuf = malloc(*outlen);
     *outbuf = malloc(*outlen);
-    if (outbuf == NULL) {
+    if (*outbuf == NULL) {
         ESP_LOGE(TAG, "Failed to allocate memory for version response");
         ESP_LOGE(TAG, "Failed to allocate memory for version response");
         return ESP_ERR_NO_MEM;
         return ESP_ERR_NO_MEM;
     }
     }