Commit e8a655df authored by Marek Vasut's avatar Marek Vasut
Browse files

mxssb: Fix possible crash when memory allocation fail

In case the memory allocation fails in the command parser, there
will might remain some allocated memory upon return. Fix this.
Signed-off-by: Marek Vasut's avatarMarek Vasut <>
parent 443eb3f3
......@@ -624,7 +624,7 @@ static int sb_parse_cmds(struct sb_section_ctx *sctx)
while (insts--) {
cctx = calloc(1, sizeof(*cctx));
if (!cctx)
return -ENOMEM;
goto err;
if (!head)
head = cctx;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment