Revision 7267c094 migration-tcp.c

b/migration-tcp.c
89 89
    if (parse_host_port(&addr, host_port) < 0)
90 90
        return NULL;
91 91

  
92
    s = qemu_mallocz(sizeof(*s));
92
    s = g_malloc0(sizeof(*s));
93 93

  
94 94
    s->get_error = socket_errno;
95 95
    s->write = socket_write;
......
106 106
    s->bandwidth_limit = bandwidth_limit;
107 107
    s->fd = qemu_socket(PF_INET, SOCK_STREAM, 0);
108 108
    if (s->fd == -1) {
109
        qemu_free(s);
109
        g_free(s);
110 110
        return NULL;
111 111
    }
112 112

  

Also available in: Unified diff