mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
hud: plug memory leak on error path
This commit is contained in:
parent
c958883a0e
commit
ee196c299d
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user