[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 5/5] libxl: drop dead assignment to transaction variable from libxl__domain_make()


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 12 Jun 2023 13:47:50 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AnyjzGqpglbOicW2phJjjVaeWkQi3azKxAQ6SvQhGCQ=; b=kTV4tS7pn9l4+Jsr73aeYLmCk1/kTmWRsmZEnyTLrAs/u1H1Jrb6BAZnYDu8MtclYFudKcMMkD/DuKhmP+l6Oxm7KlzzpK/WuXgA/GNoR/JIw+sj/BqLOcO3VK4KZSAC5SW6DpdywAldU5gL3OzkmRd0+IQR1GCLNq3tCFLNEgJbpeMERwTpBQuqb3Cy8WOV31CcgG+MQdu7XvTOjBfQ+3aXoRVk9ypFYtvuHg2V9veMPM5XVtpLU/qZd3UQhwRzOVGLtxV1chnUeP/n58JtM/wI5ki2cOdp5VpkNDaVNFT5Qh2n6DcdIQ7FxP1g9jfQF1Y9xpwZdHWO610MaCvoRA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mvLXPY/UuRVEiZdNmc2i9Bd1VhMS8sZM+1rwYaMMAXyFErAUi5kxH+Bc9firnll8L4Pc+2ZKZr7gJ4CpL2QiCdDNyPuncoX7VJ944aEnltfOw4v1PjH/jYldcIEb916qLJo1seoLzFUWRw8llPHCNVBW4l9kSgrvrmc3VgEHwaZ4fsqkCFmLH7CZm+jBMnRvxaRincOjjJT9QhMBLGQa6uom0ns3PufLPgwG40aqdHqCuy4UUaokf8O9dVi/ztn8ePn4d3yPiUWMr9Gn+aNeEF52aLGw6bCb4pDvL8eZYG75gURFqFzfhGEaJZDHK+w1srwqEi/TVWMWugA7HT+/fA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Anthony Perard <anthony.perard@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Mon, 12 Jun 2023 11:49:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

"t" is written first thing at the "retry_transaction" label.

Coverity ID: 1532321
Fixes: 1057300109ea ("libxl: fix error handling (xenstore transaction leak) in 
libxl__domain_make")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/tools/libs/light/libxl_create.c
+++ b/tools/libs/light/libxl_create.c
@@ -909,10 +909,8 @@ retry_transaction:
              strlen(dom_type));
 
     if (!xs_transaction_end(ctx->xsh, t, 0)) {
-        if (errno == EAGAIN) {
-            t = 0;
+        if (errno == EAGAIN)
             goto retry_transaction;
-        }
         LOGED(ERROR, *domid, "domain creation ""xenstore transaction commit 
failed");
         rc = ERROR_FAIL;
         goto out;




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.