From: Chuck Lever <chuck.lever@oracle.com>
To: steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 4/4] libexport.a: e_fslocdata should be freed with free(3)
Date: Sun, 21 Mar 2010 20:38:32 -0400 [thread overview]
Message-ID: <20100322003832.30360.25119.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100322003317.30360.18289.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
Clean up: Since e_fslocdata is allocated with strdup(3), and not
xstrdup(), it should be freed with free(3), and not xfree().
It looks like we could get rid of the "if (thing I'm freeing isn't
NULL)" checks too, but that's for another day.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
support/export/export.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/support/export/export.c b/support/export/export.c
index ba643b2..42e78f6 100644
--- a/support/export/export.c
+++ b/support/export/export.c
@@ -277,7 +277,7 @@ export_freeall(void)
if (exp->m_export.e_mountpoint)
free(exp->m_export.e_mountpoint);
if (exp->m_export.e_fslocdata)
- xfree(exp->m_export.e_fslocdata);
+ free(exp->m_export.e_fslocdata);
xfree(exp->m_export.e_hostname);
xfree(exp);
}
next prev parent reply other threads:[~2010-03-22 0:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 0:37 [PATCH 0/4] mountd cleanup Chuck Lever
[not found] ` <20100322003317.30360.18289.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-03-22 0:38 ` [PATCH 1/4] libexport.a: Remove dead code Chuck Lever
2010-03-22 0:38 ` [PATCH 2/4] libexport.a: Clean up client_compose() and client_member() Chuck Lever
2010-03-22 0:38 ` [PATCH 3/4] libexport.a: Fix whitespace damage in support/export/export.c Chuck Lever
2010-03-22 0:38 ` Chuck Lever [this message]
2010-03-22 14:19 ` [PATCH 0/4] mountd cleanup Steve Dickson
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=20100322003832.30360.25119.stgit@localhost.localdomain \
--to=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox