Remove one part of the static analysis fix that actually breaks the package

This commit is contained in:
Vitezslav Crhonek 2021-04-27 10:14:12 +02:00
parent 94d128363a
commit ab3545efb9
2 changed files with 8 additions and 24 deletions

View File

@ -1,6 +1,6 @@
diff -up kbd-2.4.0/src/libkbdfile/kbdfile.c.orig kbd-2.4.0/src/libkbdfile/kbdfile.c
--- kbd-2.4.0/src/libkbdfile/kbdfile.c.orig 2020-11-11 13:44:48.000000000 +0100
+++ kbd-2.4.0/src/libkbdfile/kbdfile.c 2021-04-22 08:00:04.981522542 +0200
+++ kbd-2.4.0/src/libkbdfile/kbdfile.c 2021-04-27 09:58:08.405671071 +0200
@@ -39,8 +39,10 @@ kbdfile_new(struct kbdfile_ctx *ctx)
if (!fp->ctx) {
@ -33,7 +33,7 @@ diff -up kbd-2.4.0/src/libkbdfile/kbdfile.c.orig kbd-2.4.0/src/libkbdfile/kbdfil
return 0;
diff -up kbd-2.4.0/src/libkeymap/common.c.orig kbd-2.4.0/src/libkeymap/common.c
--- kbd-2.4.0/src/libkeymap/common.c.orig 2019-06-24 13:55:23.000000000 +0200
+++ kbd-2.4.0/src/libkeymap/common.c 2021-04-22 08:00:04.981522542 +0200
+++ kbd-2.4.0/src/libkeymap/common.c 2021-04-27 09:58:08.405671071 +0200
@@ -139,6 +139,7 @@ init_array(struct lk_ctx *ctx, struct lk
rc = lk_array_init(ptr, size, 0);
if (rc < 0) {
@ -44,7 +44,7 @@ diff -up kbd-2.4.0/src/libkeymap/common.c.orig kbd-2.4.0/src/libkeymap/common.c
diff -up kbd-2.4.0/src/libkfont/psffontop.c.orig kbd-2.4.0/src/libkfont/psffontop.c
--- kbd-2.4.0/src/libkfont/psffontop.c.orig 2020-04-27 17:53:01.000000000 +0200
+++ kbd-2.4.0/src/libkfont/psffontop.c 2021-04-22 11:59:54.513520000 +0200
+++ kbd-2.4.0/src/libkfont/psffontop.c 2021-04-27 09:59:14.170153676 +0200
@@ -235,6 +235,7 @@ kfont_read_psffont(struct kfont_context
if (psfhdr->mode > PSF1_MAXMODE) {
@ -91,23 +91,3 @@ diff -up kbd-2.4.0/src/libkfont/psffontop.c.orig kbd-2.4.0/src/libkfont/psffonto
return -EX_DATAERR;
}
@@ -289,8 +296,10 @@ kfont_read_psffont(struct kfont_context
if (fontwidthp)
*fontwidthp = fontwidth;
- if (!uclistheadsp)
+ if (!uclistheadsp) {
+ free(inputbuf);
return 0; /* got font, don't need unicode_list */
+ }
struct unicode_list *ptr;
@@ -322,6 +331,7 @@ kfont_read_psffont(struct kfont_context
clear_uni_entry(&(*uclistheadsp)[fontpos0 + i]);
}
+ free(inputbuf);
return 0; /* got psf font */
}

View File

@ -5,7 +5,7 @@
Name: kbd
Version: 2.4.0
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Tools for configuring the console (keyboard, virtual terminals, etc.)
License: GPLv2+
URL: http://www.kbd-project.org/
@ -200,6 +200,10 @@ make check
%{kbd_datadir}/keymaps/legacy
%changelog
* Tue Apr 27 2021 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.4.0-4
- Remove one part of the static analysis fix that actually breaks the package
Resolves: #1953782
* Thu Apr 22 2021 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.4.0-3
- Fix issues detected by static analysis
- Fix layout->keymap conversion broken by change in xkeyboard-config