monitor: fix small memory leak
The members of the array returned from get_all_seats are strdup'd as well. Signed-off-by: Ran Benita <ran234@gmail.com> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
8af8f47143
commit
de078499d2
@ -256,6 +256,7 @@ static void monitor_refresh_seats(struct uterm_monitor *mon)
|
||||
for (i = 0; i < num; ++i) {
|
||||
if (seats[i])
|
||||
monitor_new_seat(mon, seats[i]);
|
||||
free(seats[i]);
|
||||
}
|
||||
|
||||
free(seats);
|
||||
|
Loading…
x
Reference in New Issue
Block a user