Revision 7267c094 linux-user/syscall.c

b/linux-user/syscall.c
3991 3991
        new_thread_info info;
3992 3992
        pthread_attr_t attr;
3993 3993
#endif
3994
        ts = qemu_mallocz(sizeof(TaskState));
3994
        ts = g_malloc0(sizeof(TaskState));
3995 3995
        init_task_state(ts);
3996 3996
        /* we create a new CPU instance. */
3997 3997
        new_env = cpu_copy(env);
......
4057 4057
        if (flags & CLONE_NPTL_FLAGS2)
4058 4058
            return -EINVAL;
4059 4059
        /* This is probably going to die very quickly, but do it anyway.  */
4060
        new_stack = qemu_mallocz (NEW_STACK_SIZE);
4060
        new_stack = g_malloc0 (NEW_STACK_SIZE);
4061 4061
#ifdef __ia64__
4062 4062
        ret = __clone2(clone_func, new_stack, NEW_STACK_SIZE, flags, new_env);
4063 4063
#else
......
4651 4651
                        NULL, NULL, 0);
4652 4652
          }
4653 4653
          thread_env = NULL;
4654
          qemu_free(cpu_env);
4655
          qemu_free(ts);
4654
          g_free(cpu_env);
4655
          g_free(ts);
4656 4656
          pthread_exit(NULL);
4657 4657
      }
4658 4658
#endif

Also available in: Unified diff