[gnome-builder] lsp: defend against a floating ref
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] lsp: defend against a floating ref
- Date: Wed, 4 Dec 2019 23:50:23 +0000 (UTC)
commit 622e201651f9082c4370a3dabd3e7ca456627010
Author: Christian Hergert <chergert redhat com>
Date: Wed Dec 4 15:50:18 2019 -0800
lsp: defend against a floating ref
src/libide/lsp/ide-lsp-client.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/libide/lsp/ide-lsp-client.c b/src/libide/lsp/ide-lsp-client.c
index cca22c10e..be5d9a940 100644
--- a/src/libide/lsp/ide-lsp-client.c
+++ b/src/libide/lsp/ide-lsp-client.c
@@ -719,6 +719,9 @@ ide_lsp_client_handle_call (IdeLspClient *self,
if (config != NULL)
{
+ /* Ensure we didn't get anything floating */
+ g_variant_take_ref (config);
+
jsonrpc_client_reply_async (client, id, config, NULL, NULL, NULL);
IDE_RETURN (TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]