atom: fix memory leak

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-05-06 16:20:16 +01:00
parent 7ed9f2884f
commit e894105e7b
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 4 additions and 0 deletions

View File

@ -1,3 +1,6 @@
#pragma once
#include <stdlib.h>
#include <xcb/xcb.h>
#include "meta.h"
@ -48,4 +51,5 @@ static inline xcb_atom_t get_atom(struct atom *a, const char *key) {
static inline void destroy_atoms(struct atom *a) {
cache_free(a->c);
free(a);
}