commit b686cf3cff1a1357ee48b6322815b9abfd023403
parent 0a6bf4dffda2358d92e1f8a67ad6ef967357d87d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 12 Mar 2026 11:46:49 +0100
sln-build: Fixed loading of lines in SHTR format
Once loaded, the list of lines was mistakenly deleted before being used,
resulting in invalid memory access.
Diffstat:
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/sln_build.c b/src/sln_build.c
@@ -302,19 +302,11 @@ static res_T
load_lines_shtr(struct cmd* cmd, const struct args* args)
{
struct shtr_line_list_read_args rlines_args = SHTR_LINE_LIST_READ_ARGS_NULL;
- res_T res = RES_OK;
ASSERT(cmd && args);
rlines_args.filename = args->lines;
- res = shtr_line_list_read(cmd->shtr, &rlines_args, &cmd->lines);
- if(res != RES_OK) goto error;
-
-exit:
- if(cmd->lines) SHTR(line_list_ref_put(cmd->lines));
- return res;
-error:
- goto exit;
+ return shtr_line_list_read(cmd->shtr, &rlines_args, &cmd->lines);
}
static res_T