Fix potential memleaks in linuxraw.

This commit is contained in:
Themaister 2013-11-03 11:44:12 +01:00
parent 864ba94a88
commit 6b37d11e69

View File

@ -202,7 +202,10 @@ static void *linuxraw_input_init(void)
newTerm.c_cc[VTIME] = 0;
if (ioctl(0, KDGKBMODE, &oldKbmd) != 0)
{
free(linuxraw);
return NULL;
}
}
tcsetattr(0, TCSAFLUSH, &newTerm);
@ -210,6 +213,7 @@ static void *linuxraw_input_init(void)
if (ioctl(0, KDSKBMODE, K_MEDIUMRAW) != 0)
{
linuxraw_resetKbmd();
free(linuxraw);
return NULL;
}