From 08c5303c52d76ebe4a8d6027cde704bc0e44e030 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 56525e74..69a5e5cd 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); }