File: fix-rpc-layer-memory-leak.patch

package info (click to toggle)
pkcs11-proxy 0.4.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 596 kB
  • sloc: ansic: 7,171; python: 362; sh: 26; makefile: 3
file content (24 lines) | stat: -rw-r--r-- 896 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Author: Stef Walter <stefw@gnome.org>
Origin: vendor
Bug-Upstream: https://bugzilla.gnome.org/show_bug.cgi?id=684351
Url: https://gitlab.gnome.org/GNOME/gnome-keyring/-/commit/0c71452290977332a0e86d9eb0d04b291cce2263

Index: pkcs11-proxy/gck-rpc-module.c
===================================================================
--- pkcs11-proxy.orig/gck-rpc-module.c
+++ pkcs11-proxy/gck-rpc-module.c
@@ -1444,6 +1444,14 @@ static CK_RV rpc_C_Finalize(CK_VOID_PTR
 	if (ret != CKR_OK)
 		warning(("finalizing the daemon returned an error: %d", ret));
 
+	// https://gitlab.gnome.org/GNOME/gnome-keyring/-/commit/0c71452290977332a0e86d9eb0d04b291cce2263
+	/* Cleanup the call state pool */
+	while (call_state_pool) {
+		cs = call_state_pool;
+		call_state_pool = cs->next;
+		call_destroy (cs);
+	}
+
 	/* This should stop all other calls in */
 	pkcs11_initialized = 0;
 	pkcs11_initialized_pid = 0;