mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Fix memory leak on error path in http_header_set_format
This commit is contained in:
parent
f1ba2b3e3a
commit
5401610a4e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user