From 84817dbb02323ec58dc4862d5f2f34777f40b96d Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Wed, 15 Feb 2023 20:29:42 +0900 Subject: [PATCH] yutani: fix incorrect allocation of menu bar objects --- lib/kuroko/_yutani2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kuroko/_yutani2.c b/lib/kuroko/_yutani2.c index 467a07ca..5e2d3e84 100644 --- a/lib/kuroko/_yutani2.c +++ b/lib/kuroko/_yutani2.c @@ -904,7 +904,7 @@ KRK_Method(MenuBar,__init__) { NO_REINIT(MenuBar); size_t count = entries->values.count; - struct menu_bar * out = malloc(sizeof(struct menu_bar)); + struct menu_bar * out = calloc(sizeof(struct menu_bar), 1); out->entries = calloc(sizeof(struct menu_bar_entries), count + 1); for (size_t i = 0; i < count; ++i) {