[X2Go-Commits] [nx-libs] 90/219: Keyboard.c: fix three memory leaks

git-admin at x2go.org git-admin at x2go.org
Sat Sep 28 12:10:28 CEST 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit 6da1066109241d8c84cdb2b4674f4dd2a15c1a9c
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Wed Jun 19 23:44:40 2019 +0200

    Keyboard.c: fix three memory leaks
    
    ==12976==ERROR: LeakSanitizer: detected memory leaks
    
    Direct leak of 6 byte(s) in 1 object(s) allocated from:
        #0 0x7f510b3ac810 in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3a810)
        #1 0x559ca29c5035 in nxagentKeyboardProc /home/uli/work/nx/ArcticaProject/nx-libs/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c:866
        #2 0x7a29bff07  (<unknown module>)
    
    Direct leak of 1 byte(s) in 1 object(s) allocated from:
        #0 0x7f510b3ac810 in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3a810)
        #1 0x559ca29c509a in nxagentKeyboardProc /home/uli/work/nx/ArcticaProject/nx-libs/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c:870
        #2 0x7a29bff07  (<unknown module>)
    
    Direct leak of 1 byte(s) in 1 object(s) allocated from:
        #0 0x7f510b3ac810 in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3a810)
        #1 0x559ca29c507f in nxagentKeyboardProc /home/uli/work/nx/ArcticaProject/nx-libs/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c:869
        #2 0x7a29bff07  (<unknown module>)
    
    SUMMARY: AddressSanitizer: 8 byte(s) leaked in 3 allocation(s).
---
 nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index cff92ec48..b2ae7dfd1 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -945,6 +945,10 @@ XkbError:
         {
           NXShadowInitKeymap(&(pDev->key->curKeySyms));
         }
+
+	free(rules);
+	free(variant);
+	free(options);
       }
 
       if (xkb)

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list