Unverified Commit 0d83285d by Wolfgang Bumiller Committed by Christian Brauner

seccomp: leak fixup

Fix an error case not free()ing the line forgotten during the move from fgets() on a static buffer to using getline. Signed-off-by: 's avatarWolfgang Bumiller <w.bumiller@proxmox.com> Fixes: ccf8d128 ("seccomp: parse_config_v1()")
parent 6e816a91
...@@ -54,8 +54,10 @@ static int parse_config_v1(FILE *f, struct lxc_conf *conf) ...@@ -54,8 +54,10 @@ static int parse_config_v1(FILE *f, struct lxc_conf *conf)
int nr; int nr;
ret = sscanf(line, "%d", &nr); ret = sscanf(line, "%d", &nr);
if (ret != 1) if (ret != 1) {
return -1; ret = -1;
break;
}
#if HAVE_SCMP_FILTER_CTX #if HAVE_SCMP_FILTER_CTX
ret = seccomp_rule_add(conf->seccomp_ctx, SCMP_ACT_ALLOW, nr, 0); ret = seccomp_rule_add(conf->seccomp_ctx, SCMP_ACT_ALLOW, nr, 0);
......
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