From d21dadeeaed1418320999488d9ce55055a00c323 Mon Sep 17 00:00:00 2001 From: Li Zhang Date: Fri, 24 Jun 2016 17:24:21 +0800 Subject: [PATCH] Fix xkb_context memory leak Change-Id: If54fcbcbd4eb4474d4bb9f6c7c397be670c38b7a --- ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp b/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp index d83272f..8766b68 100644 --- a/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp +++ b/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp @@ -684,6 +684,11 @@ _wsc_im_deactivate(void *data, struct wl_input_method *input_method, struct wl_i wsc_ctx->keymap = NULL; } + if (wsc_ctx->xkb_context) { + xkb_context_unref (wsc_ctx->xkb_context); + wsc_ctx->xkb_context = NULL; + } + if (wsc_ctx->im_ctx) { wl_input_method_context_destroy (wsc_ctx->im_ctx); wsc_ctx->im_ctx = NULL; -- 2.7.4