dname = args->dname == NULL ? NULL : *args->dname;
- if (!(stream = remoteCreateClientStream(conn, hdr))) {
- virReportOOMError();
+ if (!(stream = remoteCreateClientStream(conn, hdr)))
goto cleanup;
- }
if (virDomainMigratePrepareTunnel(conn, stream->st,
args->flags, dname, args->resource,
if (!(dom = get_nonnull_domain(conn, args->dom)))
goto cleanup;
- if (!(stream = remoteCreateClientStream(conn, hdr))) {
- virReportOOMError();
+ if (!(stream = remoteCreateClientStream(conn, hdr)))
goto cleanup;
- }
if (virDomainOpenConsole(dom,
args->devname ? *args->devname : NULL,
#include "memory.h"
#include "dispatch.h"
#include "logging.h"
+#include "virterror_internal.h"
+
+#define VIR_FROM_THIS VIR_FROM_STREAMS
static int
remoteStreamHandleWrite(struct qemud_client *client,
VIR_DEBUG("proc=%d serial=%d", hdr->proc, hdr->serial);
- if (VIR_ALLOC(stream) < 0)
+ if (VIR_ALLOC(stream) < 0) {
+ virReportOOMError();
return NULL;
+ }
stream->procedure = hdr->proc;
stream->serial = hdr->serial;