From: Doug Nazar <nazard@nazar.ca>
To: linux-nfs@vger.kernel.org
Subject: [PATCH 04/10] gssd: gssd_k5_err_msg() returns a strdup'd msg. Use free() to release.
Date: Wed, 1 Jul 2020 14:27:55 -0400 [thread overview]
Message-ID: <20200701182803.14947-5-nazard@nazar.ca> (raw)
In-Reply-To: <20200701182803.14947-1-nazard@nazar.ca>
Signed-off-by: Doug Nazar <nazard@nazar.ca>
---
utils/gssd/krb5_util.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
index c49c6672..b1e48241 100644
--- a/utils/gssd/krb5_util.c
+++ b/utils/gssd/krb5_util.c
@@ -484,7 +484,7 @@ gssd_get_single_krb5_cred(krb5_context context,
if (ccache)
krb5_cc_close(context, ccache);
krb5_free_cred_contents(context, &my_creds);
- krb5_free_string(context, k5err);
+ free(k5err);
return (code);
}
@@ -723,7 +723,7 @@ gssd_search_krb5_keytab(krb5_context context, krb5_keytab kt,
"we failed to unparse principal name: %s\n",
k5err);
k5_free_kt_entry(context, kte);
- krb5_free_string(context, k5err);
+ free(k5err);
k5err = NULL;
continue;
}
@@ -770,7 +770,7 @@ gssd_search_krb5_keytab(krb5_context context, krb5_keytab kt,
if (retval < 0)
retval = 0;
out:
- krb5_free_string(context, k5err);
+ free(k5err);
return retval;
}
@@ -927,7 +927,7 @@ find_keytab_entry(krb5_context context, krb5_keytab kt,
k5err = gssd_k5_err_msg(context, code);
printerr(1, "%s while building principal for '%s'\n",
k5err, spn);
- krb5_free_string(context, k5err);
+ free(k5err);
k5err = NULL;
continue;
}
@@ -937,7 +937,7 @@ find_keytab_entry(krb5_context context, krb5_keytab kt,
k5err = gssd_k5_err_msg(context, code);
printerr(3, "%s while getting keytab entry for '%s'\n",
k5err, spn);
- krb5_free_string(context, k5err);
+ free(k5err);
k5err = NULL;
/*
* We tried the active directory machine account
@@ -986,7 +986,7 @@ out:
k5_free_default_realm(context, default_realm);
if (realmnames)
krb5_free_host_realm(context, realmnames);
- krb5_free_string(context, k5err);
+ free(k5err);
return retval;
}
@@ -1355,7 +1355,7 @@ out_free_kt:
out_free_context:
krb5_free_context(context);
out:
- krb5_free_string(context, k5err);
+ free(k5err);
return retval;
}
--
2.26.2
next prev parent reply other threads:[~2020-07-01 18:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 18:27 [PATCH 00/10] Misc fixes & cleanups for nfs-utils Doug Nazar
2020-07-01 18:27 ` [PATCH 01/10] gssd: Refcount struct clnt_info to protect multithread usage Doug Nazar
2020-07-01 18:27 ` [PATCH 02/10] Update to libevent 2.x apis Doug Nazar
2020-07-01 18:27 ` [PATCH 03/10] gssd: Cleanup on exit to support valgrind Doug Nazar
2020-07-01 18:27 ` Doug Nazar [this message]
2020-07-08 14:50 ` [PATCH 04/10] gssd: gssd_k5_err_msg() returns a ". Use free() to release Steve Dickson
2020-07-12 20:27 ` Doug Nazar
2020-07-13 18:47 ` Steve Dickson
2020-07-13 22:22 ` Doug Nazar
2020-07-01 18:27 ` [PATCH 05/10] gssd: Fix locking for machine principal list Doug Nazar
2020-07-01 18:27 ` [PATCH 06/10] gssd: Add a few debug statements to help track client_info lifetimes Doug Nazar
2020-07-01 18:27 ` [PATCH 07/10] gssd: Lookup local hostname when srchost is '*' Doug Nazar
2020-07-01 18:27 ` [PATCH 08/10] gssd: We never use the nocache param of gssd_check_if_cc_exists() Doug Nazar
2020-07-01 18:28 ` [PATCH 09/10] Cleanup printf format attribute handling and fix format strings Doug Nazar
2020-07-01 18:28 ` [PATCH 09/10] Cleanup printf format attribute handling and fix various " Doug Nazar
2020-07-01 18:28 ` [PATCH 09/10] Consolidate " Doug Nazar
2020-07-01 18:28 ` [PATCH 10/10] Fix various clang warnings Doug Nazar
2020-07-14 18:38 ` [PATCH 00/10] Misc fixes & cleanups for nfs-utils Steve Dickson
2020-07-16 6:56 ` Doug Nazar
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=20200701182803.14947-5-nazard@nazar.ca \
--to=nazard@nazar.ca \
--cc=linux-nfs@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).