From 75b7d91abfaf56f195e114fec1cea52b77463ec6 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Sat, 21 May 2022 13:08:46 +0300 Subject: [PATCH] hekate: always init sublist on section creation Even if there are no edge cases here --- bootloader/hos/pkg2_ini_kippatch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootloader/hos/pkg2_ini_kippatch.c b/bootloader/hos/pkg2_ini_kippatch.c index e683320..2d1eb5b 100644 --- a/bootloader/hos/pkg2_ini_kippatch.c +++ b/bootloader/hos/pkg2_ini_kippatch.c @@ -89,6 +89,9 @@ static ini_kip_sec_t *_ini_create_kip_section(link_t *dst, ini_kip_sec_t *ksec, // Get hash section. _htoa(ksec->hash, &name[i], 8, NULL); + // Initialize list. + list_init(&ksec->pts); + return ksec; } @@ -122,7 +125,6 @@ int ini_patch_parse(link_t *dst, char *ini_path) // Set patchset kip name and hash. ksec = _ini_create_kip_section(dst, ksec, &lbuf[1]); - list_init(&ksec->pts); } else if (ksec && lbuf[0] == '.') // Extract key/value. {