Skip to content

Commit

Permalink
Merge branch 'fix/memory_leaks_identified_by_cppcheck_v3.3' into 'rel…
Browse files Browse the repository at this point in the history
…ease/v3.3'

Fix/memory leaks identified by cppcheck (v3.3)

See merge request espressif/esp-idf!14505
  • Loading branch information
mahavirj committed Jul 26, 2021
2 parents b2a9dc2 + 5401610 commit f69d7ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/esp_http_client/lib/http_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ static int md5_printf(char *md, const char *fmt, ...)
va_start(ap, fmt);
len = vasprintf((char **)&buf, fmt, ap);
if (buf == NULL) {
va_end(ap);
return ESP_FAIL;
}

Expand Down
2 changes: 1 addition & 1 deletion components/esp_http_client/lib/http_header.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f69d7ca

Please sign in to comment.