FILE *f;
s = qemu_mallocz(sizeof(*s));
- if (s == NULL) {
- dprintf("Unable to allocate FdMigrationState\n");
- goto err;
- }
f = popen(command, "w");
if (f == NULL) {
s->opaque = qemu_popen(f, "w");
+ s->close = exec_close;
s->get_error = file_errno;
s->write = file_write;
s->mig_state.cancel = migrate_fd_cancel;
pclose(f);
err_after_alloc:
qemu_free(s);
-err:
return NULL;
}