x86/irq: avoid use-after-free on error path in pirq_guest_bind()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 23 Jan 2014 12:55:42 +0000 (13:55 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 23 Jan 2014 12:55:42 +0000 (13:55 +0100)
This is XSA-83.

Coverity-ID: 1146952

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/irq.c

index a47d4f640bd891c9861a3d65c567c9db2aea230e..db70077e4e83e6f6cfa8ecfb6f0849753c50cc41 100644 (file)
@@ -1590,8 +1590,7 @@ int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share)
             printk(XENLOG_G_INFO
                    "Cannot bind IRQ%d to dom%d. Out of memory.\n",
                    pirq->pirq, v->domain->domain_id);
-            rc = -ENOMEM;
-            goto out;
+            return -ENOMEM;
         }
 
         action = newaction;