From: Bas Peters <baspeters93@gmail.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] fs: dlm: lockspace.c: removal of unnecessary check before calling kfree()
Date: Wed, 11 Feb 2015 10:26:54 +0100 [thread overview]
Message-ID: <1423646814-22720-1-git-send-email-baspeters93@gmail.com> (raw)
kfree() checks its argument. It is therefore unnecessary to do this
twice.
This issue was detected using Coccinelle.
Signed-off-by: Bas Peters <baspeters93@gmail.com>
---
fs/dlm/lockspace.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index f3e7278..b660b93 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -674,8 +674,7 @@ static int new_lockspace(const char *name, const char *cluster,
out_lkbidr:
idr_destroy(&ls->ls_lkbidr);
for (i = 0; i < DLM_REMOVE_NAMES_MAX; i++) {
- if (ls->ls_remove_names[i])
- kfree(ls->ls_remove_names[i]);
+ kfree(ls->ls_remove_names[i]);
}
out_rsbtbl:
vfree(ls->ls_rsbtbl);
--
2.1.0
WARNING: multiple messages have this Message-ID (diff)
From: Bas Peters <baspeters93@gmail.com>
To: ccaulfie@redhat.com, teigland@redhat.com
Cc: Bas Peters <baspeters93@gmail.com>,
cluster-devel@redhat.com, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH] fs: dlm: lockspace.c: removal of unnecessary check before calling kfree()
Date: Wed, 11 Feb 2015 09:26:54 +0000 [thread overview]
Message-ID: <1423646814-22720-1-git-send-email-baspeters93@gmail.com> (raw)
kfree() checks its argument. It is therefore unnecessary to do this
twice.
This issue was detected using Coccinelle.
Signed-off-by: Bas Peters <baspeters93@gmail.com>
---
fs/dlm/lockspace.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index f3e7278..b660b93 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -674,8 +674,7 @@ static int new_lockspace(const char *name, const char *cluster,
out_lkbidr:
idr_destroy(&ls->ls_lkbidr);
for (i = 0; i < DLM_REMOVE_NAMES_MAX; i++) {
- if (ls->ls_remove_names[i])
- kfree(ls->ls_remove_names[i]);
+ kfree(ls->ls_remove_names[i]);
}
out_rsbtbl:
vfree(ls->ls_rsbtbl);
--
2.1.0
WARNING: multiple messages have this Message-ID (diff)
From: Bas Peters <baspeters93@gmail.com>
To: ccaulfie@redhat.com, teigland@redhat.com
Cc: Bas Peters <baspeters93@gmail.com>,
cluster-devel@redhat.com, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH] fs: dlm: lockspace.c: removal of unnecessary check before calling kfree()
Date: Wed, 11 Feb 2015 10:26:54 +0100 [thread overview]
Message-ID: <1423646814-22720-1-git-send-email-baspeters93@gmail.com> (raw)
kfree() checks its argument. It is therefore unnecessary to do this
twice.
This issue was detected using Coccinelle.
Signed-off-by: Bas Peters <baspeters93@gmail.com>
---
fs/dlm/lockspace.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index f3e7278..b660b93 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -674,8 +674,7 @@ static int new_lockspace(const char *name, const char *cluster,
out_lkbidr:
idr_destroy(&ls->ls_lkbidr);
for (i = 0; i < DLM_REMOVE_NAMES_MAX; i++) {
- if (ls->ls_remove_names[i])
- kfree(ls->ls_remove_names[i]);
+ kfree(ls->ls_remove_names[i]);
}
out_rsbtbl:
vfree(ls->ls_rsbtbl);
--
2.1.0
next reply other threads:[~2015-02-11 9:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 9:26 Bas Peters [this message]
2015-02-11 9:26 ` [PATCH] fs: dlm: lockspace.c: removal of unnecessary check before calling kfree() Bas Peters
2015-02-11 9:26 ` Bas Peters
2015-02-11 12:10 ` [Cluster-devel] " SF Markus Elfring
2015-02-11 12:10 ` SF Markus Elfring
2015-02-11 12:10 ` SF Markus Elfring
2015-02-11 12:12 ` [Cluster-devel] " Bas Peters
2015-02-11 12:12 ` Bas Peters
2015-02-11 12:12 ` Bas Peters
2015-02-11 12:20 ` [Cluster-devel] " SF Markus Elfring
2015-02-11 12:20 ` SF Markus Elfring
2015-02-11 12:20 ` SF Markus Elfring
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=1423646814-22720-1-git-send-email-baspeters93@gmail.com \
--to=baspeters93@gmail.com \
/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.