Avoid leak in CompileKeymap error path
The NULL check is unneeded, and prevented the atoms from being free'd. Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Updated for xkb_map_unref.]master
parent
5c5f7fcb7c
commit
7a7ec9b14a
|
@ -198,8 +198,7 @@ CompileKeymap(struct xkb_context *context, XkbFile *file, unsigned merge)
|
|||
|
||||
err:
|
||||
ACTION("Failed to compile keymap\n");
|
||||
if (xkb)
|
||||
xkb_map_unref(xkb);
|
||||
xkb_map_unref(xkb);
|
||||
while (unbound) {
|
||||
next = (LEDInfo *) unbound->defs.next;
|
||||
free(unbound);
|
||||
|
|
Loading…
Reference in New Issue