Skip to content

Commit

Permalink
Keyboard.c: fix three memory leaks
Browse files Browse the repository at this point in the history
==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).
  • Loading branch information
uli42 committed Jun 21, 2019
1 parent 53d4b74 commit 51fbd72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,10 @@ N/A
{
NXShadowInitKeymap(&(pDev->key->curKeySyms));
}

free(rules);
free(variant);
free(options);
}

if (xkb)
Expand Down

0 comments on commit 51fbd72

Please sign in to comment.