mirror of
https://codeberg.org/flk/meta-wayland.git
synced 2024-12-26 21:48:21 +01:00
swaylock: fix build
This commit is contained in:
parent
2c90e0a6de
commit
69291882c6
@ -0,0 +1,31 @@
|
||||
From 3e861934074148dc803e70508ad99dfbd0d14765 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Volk <f_l_k@t-online.de>
|
||||
Date: Fri, 20 Aug 2021 13:42:57 +0200
|
||||
Subject: [PATCH] load_config: fix mismatched allocation function
|
||||
|
||||
| In function 'load_config',
|
||||
| inlined from 'main' at ../git/main.c:1138:23:
|
||||
| ../git/main.c:1060:25: error: 'free' called on pointer returned from a mismatched allocation function [-Werror=mismatched-dealloc]
|
||||
| 1060 | free(config);
|
||||
|
||||
Signed-off-by: Markus Volk <f_l_k@t-online.de>
|
||||
---
|
||||
main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/main.c b/main.c
|
||||
index c65d68a..7921770 100644
|
||||
--- a/main.c
|
||||
+++ b/main.c
|
||||
@@ -1057,7 +1057,7 @@ static int load_config(char *path, struct swaylock_state *state,
|
||||
char *flag = malloc(nread + 3);
|
||||
if (flag == NULL) {
|
||||
free(line);
|
||||
- free(config);
|
||||
+ fclose(config);
|
||||
swaylock_log(LOG_ERROR, "Failed to allocate memory");
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
@ -18,6 +18,7 @@ DEPENDS = " \
|
||||
|
||||
SRC_URI = " \
|
||||
git://github.com/swaywm/swaylock.git;protocol=https \
|
||||
file://0001-load_config-fix-mismatched-allocation-function.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
@ -33,6 +34,9 @@ PACKAGECONFIG ?= " \
|
||||
pam \
|
||||
"
|
||||
|
||||
# Reproducibility issue. Fix me!
|
||||
CFLAGS:append = " -Wno-error=date-time"
|
||||
|
||||
inherit meson pkgconfig features_check
|
||||
|
||||
EXTRA_OEMESON += "--buildtype release"
|
||||
|
Loading…
Reference in New Issue
Block a user