]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
lxc: fix rpc event leak on error path in virLXCControllerEventSend
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Mon, 26 Feb 2018 11:13:50 +0000 (14:13 +0300)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 26 Feb 2018 11:20:01 +0000 (11:20 +0000)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
src/lxc/lxc_controller.c

index 7346804c18c83904bb1f8d8396adc3b68af0e07d..59609b0a03f9b77c5183dcdc6439dacb2deca709 100644 (file)
@@ -2253,7 +2253,8 @@ virLXCControllerEventSend(virLXCControllerPtr ctrl,
         goto error;
 
     VIR_DEBUG("Queue event %d %zu", procnr, msg->bufferLength);
-    virNetServerClientSendMessage(ctrl->client, msg);
+    if (virNetServerClientSendMessage(ctrl->client, msg) < 0)
+        goto error;
 
     xdr_free(proc, data);
     return;