diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2016-01-05 17:08:52 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2016-01-05 17:08:52 -0500 |
commit | 1d2d09998f094a8aed07b46b63d9872753c7cf9c (patch) | |
tree | 209bd2aa7266e41351e9abd4208f75cf151d76ac /gpsmon.c | |
parent | aa92ce5ace9f5b269b25639f274afa7fd130f503 (diff) | |
download | gpsd-1d2d09998f094a8aed07b46b63d9872753c7cf9c.tar.gz |
Prevent a memory leak in long-running gpsmon instances.
Diffstat (limited to 'gpsmon.c')
-rw-r--r-- | gpsmon.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -516,6 +516,8 @@ static bool switch_type(const struct gps_type_t *devtype) (void)delwin(devicewin); } active = newobject; + if (devicewin) + delwin(devicewin); devicewin = newwin((*active)->min_y, (*active)->min_x, 1, 0); /* screen might have JSOM on it from the init sequence */ (void)clearok(stdscr, true); |