mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
Use qemu_mallocz to allocate new thread state. Remove redundant memset.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4712 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
b2a7081acb
commit
c3a928338e
2 changed files with 2 additions and 2 deletions
|
@ -2787,7 +2787,7 @@ static int do_fork(CPUState *env, unsigned int flags, abi_ulong newsp,
|
|||
new_thread_info info;
|
||||
pthread_attr_t attr;
|
||||
#endif
|
||||
ts = malloc(sizeof(TaskState) + NEW_STACK_SIZE);
|
||||
ts = qemu_mallocz(sizeof(TaskState) + NEW_STACK_SIZE);
|
||||
init_task_state(ts);
|
||||
new_stack = ts->stack;
|
||||
/* we create a new CPU instance. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue