diff --git a/components/esp_http_client/lib/http_header.c b/components/esp_http_client/lib/http_header.c index 0e41786ec7..265bbbe7aa 100644 --- a/components/esp_http_client/lib/http_header.c +++ b/components/esp_http_client/lib/http_header.c @@ -161,8 +161,8 @@ int http_header_set_format(http_header_handle_t header, const char *key, const c char *buf = NULL; va_start(argptr, format); len = vasprintf(&buf, format, argptr); - HTTP_MEM_CHECK(TAG, buf, return 0); va_end(argptr); + HTTP_MEM_CHECK(TAG, buf, return 0); if (buf == NULL) { return 0; }