atom: fix memory leak
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
7ed9f2884f
commit
e894105e7b
@ -1,3 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
|
|
||||||
#include "meta.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) {
|
static inline void destroy_atoms(struct atom *a) {
|
||||||
cache_free(a->c);
|
cache_free(a->c);
|
||||||
|
free(a);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user