jail->argc = 2;
if (tb[JAIL_ATTR_NAME]) {
- jail->name = blobmsg_get_string(tb[JAIL_ATTR_NAME]);
+ jail->name = strdup(blobmsg_get_string(tb[JAIL_ATTR_NAME]));
jail->argc += 2;
}
if (tb[JAIL_ATTR_HOSTNAME]) {
- jail->hostname = blobmsg_get_string(tb[JAIL_ATTR_HOSTNAME]);
+ jail->hostname = strdup(blobmsg_get_string(tb[JAIL_ATTR_HOSTNAME]));
jail->argc += 2;
}
if (tb[JAIL_ATTR_PROCFS]) {
in->no_new_privs = blobmsg_get_bool(tb[INSTANCE_ATTR_NO_NEW_PRIVS]);
if (!in->trace && tb[INSTANCE_ATTR_SECCOMP])
- in->seccomp = blobmsg_get_string(tb[INSTANCE_ATTR_SECCOMP]);
+ in->seccomp = strdup(blobmsg_get_string(tb[INSTANCE_ATTR_SECCOMP]));
if (tb[INSTANCE_ATTR_PIDFILE]) {
char *pidfile = blobmsg_get_string(tb[INSTANCE_ATTR_PIDFILE]);
if (pidfile)
- in->pidfile = pidfile;
+ in->pidfile = strdup(pidfile);
}
if (tb[INSTANCE_ATTR_RELOADSIG])
free(in->config);
free(in->user);
free(in->group);
+ free(in->jail.name);
+ free(in->jail.hostname);
+ free(in->seccomp);
+ free(in->pidfile);
free(in);
}