diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-03-07 19:53:34 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-03-07 19:53:34 +0000 |
commit | 0b2381f5e125bdeb7e7aec65ac6b9647cf04771e (patch) | |
tree | cd81d60b74421f38a726642a321ef9b4851b5d3b /gdb/ser-unix.c | |
parent | 0350914acfaf4b21584a44262cd13b6a35bfce10 (diff) | |
download | gdb-0b2381f5e125bdeb7e7aec65ac6b9647cf04771e.zip gdb-0b2381f5e125bdeb7e7aec65ac6b9647cf04771e.tar.gz gdb-0b2381f5e125bdeb7e7aec65ac6b9647cf04771e.tar.bz2 |
2011-03-05 Michael Snyder <msnyder@vmware.com>
* ser-unix.c (hardwire_get_tty_state): Stop memory leak.
Diffstat (limited to 'gdb/ser-unix.c')
-rw-r--r-- | gdb/ser-unix.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c index da3a4c3..c541452 100644 --- a/gdb/ser-unix.c +++ b/gdb/ser-unix.c @@ -183,7 +183,10 @@ hardwire_get_tty_state (struct serial *scb) state = (struct hardwire_ttystate *) xmalloc (sizeof *state); if (get_tty_state (scb, state)) - return NULL; + { + xfree (state); + return NULL; + } return (serial_ttystate) state; } |