Fix the memory leak issue in the strdup function.

This commit is contained in:
Quency-D
2026-03-24 13:57:11 +08:00
parent 8435464c84
commit 65752fef72
3 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -37,7 +37,8 @@ void UITask::begin(NodePrefs* node_prefs, const char* build_date, const char* fi
}
// v1.2.3 (1 Jan 2025)
sprintf(_version_info, "%s (%s)", version, build_date);
snprintf(_version_info, sizeof(_version_info), "%s (%s)", version, build_date);
free(version);
}
void UITask::renderCurrScreen() {