fix: mem leak when a new error message overwrite the old one
This commit is contained in:
parent
e917cbc49e
commit
c0cdc72d10
|
@ -18,6 +18,7 @@ static char *errmsg = NULL;
|
|||
|
||||
void set_error(char *msg)
|
||||
{
|
||||
clear_error();
|
||||
errmsg = strdup(msg);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user