server: purge shm buffers when terminal is destroyed

This commit is contained in:
Daniel Eklöf 2019-11-02 00:49:25 +01:00
parent 8e5d386afc
commit 035ace33b6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -12,8 +12,11 @@
#define LOG_MODULE "server"
#define LOG_ENABLE_DBG 1
#include "log.h"
#include "shm.h"
#include "terminal.h"
#include "tllist.h"
#include "wayland.h"
struct client;
struct server {
@ -83,6 +86,9 @@ term_shutdown_handler(void *data, int exit_code)
{
struct client *client = data;
shm_purge(client->server->wayl->shm,
(unsigned long)(uintptr_t)client->term);
client_send_exit_code(client, exit_code);
client->term = NULL;