mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
Fix memory leak on error path in md5_printf
This commit is contained in:
committed by
Aditya Patwardhan
parent
49e5961ec5
commit
88abe2a4cb
@ -51,6 +51,7 @@ static int md5_printf(char *md, const char *fmt, ...)
|
|||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
len = vasprintf((char **)&buf, fmt, ap);
|
len = vasprintf((char **)&buf, fmt, ap);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
|
va_end(ap);
|
||||||
return ESP_FAIL;
|
return ESP_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user