hud: plug memory leak on error path

This commit is contained in:
nick black 2020-05-07 01:17:28 -04:00
parent c958883a0e
commit ee196c299d
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -363,6 +363,7 @@ int hud_schedule(const char* demoname){
} }
elem** hook = hud_print_finished(&line); elem** hook = hud_print_finished(&line);
if(hook == NULL){ if(hook == NULL){
free(cure);
return -1; return -1;
} }
*hook = cure; *hook = cure;