From e894105e7b5592e0b95611f7d14b3c97f8ea890a Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 6 May 2019 16:20:16 +0100 Subject: [PATCH] atom: fix memory leak Signed-off-by: Yuxuan Shui --- src/atom.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/atom.h b/src/atom.h index 56525e7..69a5e5c 100644 --- a/src/atom.h +++ b/src/atom.h @@ -1,3 +1,6 @@ +#pragma once +#include + #include #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); }