Skip to content

Commit

Permalink
hid.c: Fix reinitialization after an error
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 committed Apr 3, 2024
1 parent 8b43a97 commit 3aabd1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion linux/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static void register_error_str(wchar_t **error_str, const char *msg)
/* Semilar to register_error_str, but allows passing a format string with va_list args into this function. */
static void register_error_str_vformat(wchar_t **error_str, const char *format, va_list args)
{
char msg[256];
char* msg = (char*)malloc(256);
vsnprintf(msg, sizeof(msg), format, args);

register_error_str(error_str, msg);
Expand Down

0 comments on commit 3aabd1e

Please sign in to comment.