Revision 7267c094 os-win32.c

b/os-win32.c
41 41
    int result = 0;
42 42
    if (overwrite || !getenv(name)) {
43 43
        size_t length = strlen(name) + strlen(value) + 2;
44
        char *string = qemu_malloc(length);
44
        char *string = g_malloc(length);
45 45
        snprintf(string, length, "%s=%s", name, value);
46 46
        result = putenv(string);
47 47
    }
......
62 62
int qemu_add_polling_cb(PollingFunc *func, void *opaque)
63 63
{
64 64
    PollingEntry **ppe, *pe;
65
    pe = qemu_mallocz(sizeof(PollingEntry));
65
    pe = g_malloc0(sizeof(PollingEntry));
66 66
    pe->func = func;
67 67
    pe->opaque = opaque;
68 68
    for(ppe = &first_polling_entry; *ppe != NULL; ppe = &(*ppe)->next);
......
77 77
        pe = *ppe;
78 78
        if (pe->func == func && pe->opaque == opaque) {
79 79
            *ppe = pe->next;
80
            qemu_free(pe);
80
            g_free(pe);
81 81
            break;
82 82
        }
83 83
    }
......
218 218
        p--;
219 219
    *p = 0;
220 220
    if (access(buf, R_OK) == 0) {
221
        return qemu_strdup(buf);
221
        return g_strdup(buf);
222 222
    }
223 223
    return NULL;
224 224
}

Also available in: Unified diff