aboutsummaryrefslogtreecommitdiff
path: root/linux-user/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index dbba8befe7..7d41d4ab88 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -2711,7 +2711,7 @@ int main(int argc, char **argv, char **envp)
struct target_pt_regs regs1, *regs = &regs1;
struct image_info info1, *info = &info1;
struct linux_binprm bprm;
- TaskState ts1, *ts = &ts1;
+ TaskState *ts;
CPUState *env;
int optind;
const char *r;
@@ -3038,7 +3038,7 @@ int main(int argc, char **argv, char **envp)
}
target_argv[target_argc] = NULL;
- memset(ts, 0, sizeof(TaskState));
+ ts = qemu_mallocz (sizeof(TaskState));
init_task_state(ts);
/* build Task State */
ts->info = info;