Skip to contentSkip to conversation

pass-through: drop lock before calling xfree() on error path

PATCH New Jan Beulich 1 participant 1 message Jan 30, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pass-through: drop lock before calling xfree() on error path

xen/drivers/passthrough/io.c +1 -1
@@ -87,8 +87,8 @@ int pt_irq_create_bind_vtd(
 
         if ( domain_set_irq_dpci(d, hvm_irq_dpci) == 0 )
         {
-            xfree(hvm_irq_dpci);
             spin_unlock(&d->event_lock);
+            xfree(hvm_irq_dpci);
             return -EINVAL;
         }
     }