[client/common] fixes for issues detected through static analysis.

This commit is contained in:
Geoffrey McRae committed 2022-03-07 10:14:52 +11:00
1 parent a3820536ab
commit 3a8cb6a613
18 files changed
+228 -24

No files matched your search

+6
View File
@@ -152,6 +152,12 @@ MsgBoxHandle overlayMsg_show(
const char * caption, const char * fmt, va_list args)
{
struct Msg * msg = malloc(sizeof(*msg));
if (!msg)
{
DEBUG_ERROR("out of memory");
return NULL;
}
msg->caption = strdup(caption);
msg->lines = stringlist_new(false);
valloc_sprintf(&msg->message, fmt, args);