about summary refs log tree commit diff stats
path: root/src/plugins
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-07-13 00:25:45 +0100
committerJames Booth <boothj5@gmail.com>2016-07-13 00:25:45 +0100
commit7abf5062612d15f457a9246b90393dab769437a6 (patch)
treed89dcde4d347193dc524cab6c5753d7d65939242 /src/plugins
parent0991699ae65387dc67852a3f9d465de25d6067a0 (diff)
downloadprofani-tty-7abf5062612d15f457a9246b90393dab769437a6.tar.gz
Free memory when plugin windows closed
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/api.c b/src/plugins/api.c
index a5f5deea..44182440 100644
--- a/src/plugins/api.c
+++ b/src/plugins/api.c
@@ -303,6 +303,9 @@ api_win_create(
     void(*callback_destroy)(void *callback))
 {
     if (callbacks_win_exists(plugin_name, tag)) {
+        if (callback_destroy) {
+            callback_destroy(callback);
+        }
         return;
     }