[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lightning] [Patch] Free resources allocated by jit_init_debug

From: Marc Nieper-Wißkirchen
Subject: [Lightning] [Patch] Free resources allocated by jit_init_debug
Date: Tue, 03 Oct 2017 09:17:40 +0000

"init_jit" calls "jit_init_debug", which in turn invokes "bfd_openr", which allocates a bfd handle. On "jit_finish_debug" (invoked by "finish_jit"), this resource is not freed. The following patch remedies this.

diff --git a/lib/jit_disasm.c b/lib/jit_disasm.c
index 89cc289..46c6fe6 100644
--- a/lib/jit_disasm.c
+++ b/lib/jit_disasm.c
@@ -213,6 +213,7 @@ jit_finish_debug(void)
        jit_free((jit_pointer_t *)&disasm_synthetic);
     if (disasm_symbols)
        jit_free((jit_pointer_t *)&disasm_symbols);
+    bfd_close (disasm_bfd);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]