mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +00:00
Fix potential memleaks in linuxraw.
This commit is contained in:
parent
864ba94a88
commit
6b37d11e69
@ -202,7 +202,10 @@ static void *linuxraw_input_init(void)
|
|||||||
newTerm.c_cc[VTIME] = 0;
|
newTerm.c_cc[VTIME] = 0;
|
||||||
|
|
||||||
if (ioctl(0, KDGKBMODE, &oldKbmd) != 0)
|
if (ioctl(0, KDGKBMODE, &oldKbmd) != 0)
|
||||||
|
{
|
||||||
|
free(linuxraw);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tcsetattr(0, TCSAFLUSH, &newTerm);
|
tcsetattr(0, TCSAFLUSH, &newTerm);
|
||||||
@ -210,6 +213,7 @@ static void *linuxraw_input_init(void)
|
|||||||
if (ioctl(0, KDSKBMODE, K_MEDIUMRAW) != 0)
|
if (ioctl(0, KDSKBMODE, K_MEDIUMRAW) != 0)
|
||||||
{
|
{
|
||||||
linuxraw_resetKbmd();
|
linuxraw_resetKbmd();
|
||||||
|
free(linuxraw);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user