diff options
author | Michael Snyder <msnyder@specifix.com> | 2011-03-07 19:53:32 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@specifix.com> | 2011-03-07 19:53:32 +0000 |
commit | e3e944cf879ee5f1b73091d21f1519b0f29bc15c (patch) | |
tree | 03f1cb504f5d889181da15a5eb62ccb6749a9cfc /gdb/ser-unix.c | |
parent | 1e487dd491198f245f53f4a912fe09293d7cc50c (diff) | |
download | gdb-e3e944cf879ee5f1b73091d21f1519b0f29bc15c.tar.gz |
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 da3a4c30b61..c541452a8cc 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; } |