2003-02-20 Wolfram Wadepohl <W.Wadepohl@indumat.de>

PR 357/rtems_misc
	* src/termios.c (rtems_termios_open):  Fixed code the incorrectly
	checked that the wrong pointer during allocation was NULL.
This commit is contained in:
Joel Sherrill
2003-02-20 20:45:40 +00:00
parent 529fc62612
commit bce9f3b173
2 changed files with 7 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
2003-02-20 Wolfram Wadepohl <W.Wadepohl@indumat.de>
PR 357/rtems_misc
* src/termios.c (rtems_termios_open): Fixed code the incorrectly
checked that the wrong pointer during allocation was NULL.
2003-02-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* src/privateenv.c: Fix prototype for free_user_env.

View File

@@ -183,7 +183,7 @@ rtems_termios_open (
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
if (tty->rawOutBuf.theBuf == NULL) {
free((void *)(tty->rawInBuf.theBuf));
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);