All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luck, Tony <tony.luck at intel.com>
To: accel-config@lists.01.org
Subject: [Accel-config] Re: [PATCH v1] accel-config: Fix static code analysis issues
Date: Fri, 04 Dec 2020 16:23:53 +0000	[thread overview]
Message-ID: <54908a95aed7433d8b66d387b7270a6a@intel.com> (raw)
In-Reply-To: 20201204111042.309062-1-ramesh.thomas@intel.com

[-- Attachment #1: Type: text/plain, Size: 536 bytes --]

@@ -615,7 +616,6 @@ err_read:
 	free(wq->wq_buf);
 	free(wq->wq_path);
 err_wq:
-	close(dfd);
 	free(wq);
 	free(path);
 	return NULL;

Maybe I'm not looking at the latest source ... but it looks like there
is one path to this code where dfd isn't closed first. Here:

 640         /* parse uuid only in mdeve wq type */
 641         if (wq->type == ACCFG_WQT_MDEV) {
 642                 ret = uuid_entry_add(ctx, wq, dfd);
 643                 if (ret < 0)
 644                         goto err_wq;
 645         }


             reply	other threads:[~2020-12-04 16:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 16:23 Luck, Tony [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-12-04 18:42 [Accel-config] Re: [PATCH v1] accel-config: Fix static code analysis issues Thomas, Ramesh
2020-12-04 15:57 Jiang, Dave

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54908a95aed7433d8b66d387b7270a6a@intel.com \
    --to=accel-config@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.