Loading acl.c +7 −7 Original line number Diff line number Diff line Loading @@ -55,8 +55,8 @@ qemu_acl *qemu_acl_init(const char *aclname) if (acl) return acl; acl = qemu_malloc(sizeof(*acl)); acl->aclname = qemu_strdup(aclname); acl = g_malloc(sizeof(*acl)); acl->aclname = g_strdup(aclname); /* Deny by default, so there is no window of "open * access" between QEMU starting, and the user setting * up ACLs in the monitor */ Loading @@ -65,7 +65,7 @@ qemu_acl *qemu_acl_init(const char *aclname) acl->nentries = 0; QTAILQ_INIT(&acl->entries); acls = qemu_realloc(acls, sizeof(*acls) * (nacls +1)); acls = g_realloc(acls, sizeof(*acls) * (nacls +1)); acls[nacls] = acl; nacls++; Loading Loading @@ -116,8 +116,8 @@ int qemu_acl_append(qemu_acl *acl, { qemu_acl_entry *entry; entry = qemu_malloc(sizeof(*entry)); entry->match = qemu_strdup(match); entry = g_malloc(sizeof(*entry)); entry->match = g_strdup(match); entry->deny = deny; QTAILQ_INSERT_TAIL(&acl->entries, entry, next); Loading @@ -142,8 +142,8 @@ int qemu_acl_insert(qemu_acl *acl, return qemu_acl_append(acl, deny, match); entry = qemu_malloc(sizeof(*entry)); entry->match = qemu_strdup(match); entry = g_malloc(sizeof(*entry)); entry->match = g_strdup(match); entry->deny = deny; QTAILQ_FOREACH(tmp, &acl->entries, next) { Loading aio.c +3 −3 Original line number Diff line number Diff line Loading @@ -75,13 +75,13 @@ int qemu_aio_set_fd_handler(int fd, * releasing the walking_handlers lock. */ QLIST_REMOVE(node, node); qemu_free(node); g_free(node); } } } else { if (node == NULL) { /* Alloc and insert if it's not already there */ node = qemu_mallocz(sizeof(AioHandler)); node = g_malloc0(sizeof(AioHandler)); node->fd = fd; QLIST_INSERT_HEAD(&aio_handlers, node, node); } Loading Loading @@ -220,7 +220,7 @@ void qemu_aio_wait(void) if (tmp->deleted) { QLIST_REMOVE(tmp, node); qemu_free(tmp); g_free(tmp); } } Loading arch_init.c +2 −2 Original line number Diff line number Diff line Loading @@ -235,7 +235,7 @@ static void sort_ram_list(void) QLIST_FOREACH(block, &ram_list.blocks, next) { ++n; } blocks = qemu_malloc(n * sizeof *blocks); blocks = g_malloc(n * sizeof *blocks); n = 0; QLIST_FOREACH_SAFE(block, &ram_list.blocks, next, nblock) { blocks[n++] = block; Loading @@ -245,7 +245,7 @@ static void sort_ram_list(void) while (--n >= 0) { QLIST_INSERT_HEAD(&ram_list.blocks, blocks[n], next); } qemu_free(blocks); g_free(blocks); } int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque) Loading async.c +2 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ struct QEMUBH { QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque) { QEMUBH *bh; bh = qemu_mallocz(sizeof(QEMUBH)); bh = g_malloc0(sizeof(QEMUBH)); bh->cb = cb; bh->opaque = opaque; bh->next = first_bh; Loading Loading @@ -74,7 +74,7 @@ int qemu_bh_poll(void) bh = *bhp; if (bh->deleted) { *bhp = bh->next; qemu_free(bh); g_free(bh); } else bhp = &bh->next; } Loading audio/alsaaudio.c +5 −5 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ static void alsa_fini_poll (struct pollhlp *hlp) for (i = 0; i < hlp->count; ++i) { qemu_set_fd_handler (pfds[i].fd, NULL, NULL, NULL); } qemu_free (pfds); g_free (pfds); } hlp->pfds = NULL; hlp->count = 0; Loading Loading @@ -260,7 +260,7 @@ static int alsa_poll_helper (snd_pcm_t *handle, struct pollhlp *hlp, int mask) if (err < 0) { alsa_logerr (err, "Could not initialize poll mode\n" "Could not obtain poll descriptors\n"); qemu_free (pfds); g_free (pfds); return -1; } Loading Loading @@ -288,7 +288,7 @@ static int alsa_poll_helper (snd_pcm_t *handle, struct pollhlp *hlp, int mask) while (i--) { qemu_set_fd_handler (pfds[i].fd, NULL, NULL, NULL); } qemu_free (pfds); g_free (pfds); return -1; } } Loading Loading @@ -816,7 +816,7 @@ static void alsa_fini_out (HWVoiceOut *hw) alsa_anal_close (&alsa->handle, &alsa->pollhlp); if (alsa->pcm_buf) { qemu_free (alsa->pcm_buf); g_free (alsa->pcm_buf); alsa->pcm_buf = NULL; } } Loading Loading @@ -979,7 +979,7 @@ static void alsa_fini_in (HWVoiceIn *hw) alsa_anal_close (&alsa->handle, &alsa->pollhlp); if (alsa->pcm_buf) { qemu_free (alsa->pcm_buf); g_free (alsa->pcm_buf); alsa->pcm_buf = NULL; } } Loading Loading
acl.c +7 −7 Original line number Diff line number Diff line Loading @@ -55,8 +55,8 @@ qemu_acl *qemu_acl_init(const char *aclname) if (acl) return acl; acl = qemu_malloc(sizeof(*acl)); acl->aclname = qemu_strdup(aclname); acl = g_malloc(sizeof(*acl)); acl->aclname = g_strdup(aclname); /* Deny by default, so there is no window of "open * access" between QEMU starting, and the user setting * up ACLs in the monitor */ Loading @@ -65,7 +65,7 @@ qemu_acl *qemu_acl_init(const char *aclname) acl->nentries = 0; QTAILQ_INIT(&acl->entries); acls = qemu_realloc(acls, sizeof(*acls) * (nacls +1)); acls = g_realloc(acls, sizeof(*acls) * (nacls +1)); acls[nacls] = acl; nacls++; Loading Loading @@ -116,8 +116,8 @@ int qemu_acl_append(qemu_acl *acl, { qemu_acl_entry *entry; entry = qemu_malloc(sizeof(*entry)); entry->match = qemu_strdup(match); entry = g_malloc(sizeof(*entry)); entry->match = g_strdup(match); entry->deny = deny; QTAILQ_INSERT_TAIL(&acl->entries, entry, next); Loading @@ -142,8 +142,8 @@ int qemu_acl_insert(qemu_acl *acl, return qemu_acl_append(acl, deny, match); entry = qemu_malloc(sizeof(*entry)); entry->match = qemu_strdup(match); entry = g_malloc(sizeof(*entry)); entry->match = g_strdup(match); entry->deny = deny; QTAILQ_FOREACH(tmp, &acl->entries, next) { Loading
aio.c +3 −3 Original line number Diff line number Diff line Loading @@ -75,13 +75,13 @@ int qemu_aio_set_fd_handler(int fd, * releasing the walking_handlers lock. */ QLIST_REMOVE(node, node); qemu_free(node); g_free(node); } } } else { if (node == NULL) { /* Alloc and insert if it's not already there */ node = qemu_mallocz(sizeof(AioHandler)); node = g_malloc0(sizeof(AioHandler)); node->fd = fd; QLIST_INSERT_HEAD(&aio_handlers, node, node); } Loading Loading @@ -220,7 +220,7 @@ void qemu_aio_wait(void) if (tmp->deleted) { QLIST_REMOVE(tmp, node); qemu_free(tmp); g_free(tmp); } } Loading
arch_init.c +2 −2 Original line number Diff line number Diff line Loading @@ -235,7 +235,7 @@ static void sort_ram_list(void) QLIST_FOREACH(block, &ram_list.blocks, next) { ++n; } blocks = qemu_malloc(n * sizeof *blocks); blocks = g_malloc(n * sizeof *blocks); n = 0; QLIST_FOREACH_SAFE(block, &ram_list.blocks, next, nblock) { blocks[n++] = block; Loading @@ -245,7 +245,7 @@ static void sort_ram_list(void) while (--n >= 0) { QLIST_INSERT_HEAD(&ram_list.blocks, blocks[n], next); } qemu_free(blocks); g_free(blocks); } int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque) Loading
async.c +2 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ struct QEMUBH { QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque) { QEMUBH *bh; bh = qemu_mallocz(sizeof(QEMUBH)); bh = g_malloc0(sizeof(QEMUBH)); bh->cb = cb; bh->opaque = opaque; bh->next = first_bh; Loading Loading @@ -74,7 +74,7 @@ int qemu_bh_poll(void) bh = *bhp; if (bh->deleted) { *bhp = bh->next; qemu_free(bh); g_free(bh); } else bhp = &bh->next; } Loading
audio/alsaaudio.c +5 −5 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ static void alsa_fini_poll (struct pollhlp *hlp) for (i = 0; i < hlp->count; ++i) { qemu_set_fd_handler (pfds[i].fd, NULL, NULL, NULL); } qemu_free (pfds); g_free (pfds); } hlp->pfds = NULL; hlp->count = 0; Loading Loading @@ -260,7 +260,7 @@ static int alsa_poll_helper (snd_pcm_t *handle, struct pollhlp *hlp, int mask) if (err < 0) { alsa_logerr (err, "Could not initialize poll mode\n" "Could not obtain poll descriptors\n"); qemu_free (pfds); g_free (pfds); return -1; } Loading Loading @@ -288,7 +288,7 @@ static int alsa_poll_helper (snd_pcm_t *handle, struct pollhlp *hlp, int mask) while (i--) { qemu_set_fd_handler (pfds[i].fd, NULL, NULL, NULL); } qemu_free (pfds); g_free (pfds); return -1; } } Loading Loading @@ -816,7 +816,7 @@ static void alsa_fini_out (HWVoiceOut *hw) alsa_anal_close (&alsa->handle, &alsa->pollhlp); if (alsa->pcm_buf) { qemu_free (alsa->pcm_buf); g_free (alsa->pcm_buf); alsa->pcm_buf = NULL; } } Loading Loading @@ -979,7 +979,7 @@ static void alsa_fini_in (HWVoiceIn *hw) alsa_anal_close (&alsa->handle, &alsa->pollhlp); if (alsa->pcm_buf) { qemu_free (alsa->pcm_buf); g_free (alsa->pcm_buf); alsa->pcm_buf = NULL; } } Loading