diff options
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_seal.c | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_unseal.c | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_mech_switch.c | 3 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_spkm3_seal.c | 3 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_spkm3_token.c | 3 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_spkm3_unseal.c | 6 | ||||
-rw-r--r-- | net/sunrpc/svc.c | 9 | ||||
-rw-r--r-- | net/sunrpc/xdr.c | 3 |
8 files changed, 11 insertions, 20 deletions
diff --git a/net/sunrpc/auth_gss/gss_krb5_seal.c b/net/sunrpc/auth_gss/gss_krb5_seal.c index 13f8ae979454..d0dfdfd5e79e 100644 --- a/net/sunrpc/auth_gss/gss_krb5_seal.c +++ b/net/sunrpc/auth_gss/gss_krb5_seal.c | |||
@@ -143,6 +143,6 @@ gss_get_mic_kerberos(struct gss_ctx *gss_ctx, struct xdr_buf *text, | |||
143 | 143 | ||
144 | return ((ctx->endtime < now) ? GSS_S_CONTEXT_EXPIRED : GSS_S_COMPLETE); | 144 | return ((ctx->endtime < now) ? GSS_S_CONTEXT_EXPIRED : GSS_S_COMPLETE); |
145 | out_err: | 145 | out_err: |
146 | if (md5cksum.data) kfree(md5cksum.data); | 146 | kfree(md5cksum.data); |
147 | return GSS_S_FAILURE; | 147 | return GSS_S_FAILURE; |
148 | } | 148 | } |
diff --git a/net/sunrpc/auth_gss/gss_krb5_unseal.c b/net/sunrpc/auth_gss/gss_krb5_unseal.c index 2030475d98ed..db055fd7d778 100644 --- a/net/sunrpc/auth_gss/gss_krb5_unseal.c +++ b/net/sunrpc/auth_gss/gss_krb5_unseal.c | |||
@@ -176,6 +176,6 @@ gss_verify_mic_kerberos(struct gss_ctx *gss_ctx, | |||
176 | 176 | ||
177 | ret = GSS_S_COMPLETE; | 177 | ret = GSS_S_COMPLETE; |
178 | out: | 178 | out: |
179 | if (md5cksum.data) kfree(md5cksum.data); | 179 | kfree(md5cksum.data); |
180 | return ret; | 180 | return ret; |
181 | } | 181 | } |
diff --git a/net/sunrpc/auth_gss/gss_mech_switch.c b/net/sunrpc/auth_gss/gss_mech_switch.c index b048bf672da2..f8bac6ccd524 100644 --- a/net/sunrpc/auth_gss/gss_mech_switch.c +++ b/net/sunrpc/auth_gss/gss_mech_switch.c | |||
@@ -60,8 +60,7 @@ gss_mech_free(struct gss_api_mech *gm) | |||
60 | 60 | ||
61 | for (i = 0; i < gm->gm_pf_num; i++) { | 61 | for (i = 0; i < gm->gm_pf_num; i++) { |
62 | pf = &gm->gm_pfs[i]; | 62 | pf = &gm->gm_pfs[i]; |
63 | if (pf->auth_domain_name) | 63 | kfree(pf->auth_domain_name); |
64 | kfree(pf->auth_domain_name); | ||
65 | pf->auth_domain_name = NULL; | 64 | pf->auth_domain_name = NULL; |
66 | } | 65 | } |
67 | } | 66 | } |
diff --git a/net/sunrpc/auth_gss/gss_spkm3_seal.c b/net/sunrpc/auth_gss/gss_spkm3_seal.c index 148201e929d0..d1e12b25d6e2 100644 --- a/net/sunrpc/auth_gss/gss_spkm3_seal.c +++ b/net/sunrpc/auth_gss/gss_spkm3_seal.c | |||
@@ -122,8 +122,7 @@ spkm3_make_token(struct spkm3_ctx *ctx, | |||
122 | 122 | ||
123 | return GSS_S_COMPLETE; | 123 | return GSS_S_COMPLETE; |
124 | out_err: | 124 | out_err: |
125 | if (md5cksum.data) | 125 | kfree(md5cksum.data); |
126 | kfree(md5cksum.data); | ||
127 | token->data = NULL; | 126 | token->data = NULL; |
128 | token->len = 0; | 127 | token->len = 0; |
129 | return GSS_S_FAILURE; | 128 | return GSS_S_FAILURE; |
diff --git a/net/sunrpc/auth_gss/gss_spkm3_token.c b/net/sunrpc/auth_gss/gss_spkm3_token.c index 46c08a0710f6..1f824578d773 100644 --- a/net/sunrpc/auth_gss/gss_spkm3_token.c +++ b/net/sunrpc/auth_gss/gss_spkm3_token.c | |||
@@ -259,8 +259,7 @@ spkm3_verify_mic_token(unsigned char **tokp, int *mic_hdrlen, unsigned char **ck | |||
259 | 259 | ||
260 | ret = GSS_S_COMPLETE; | 260 | ret = GSS_S_COMPLETE; |
261 | out: | 261 | out: |
262 | if (spkm3_ctx_id.data) | 262 | kfree(spkm3_ctx_id.data); |
263 | kfree(spkm3_ctx_id.data); | ||
264 | return ret; | 263 | return ret; |
265 | } | 264 | } |
266 | 265 | ||
diff --git a/net/sunrpc/auth_gss/gss_spkm3_unseal.c b/net/sunrpc/auth_gss/gss_spkm3_unseal.c index c3c0d9586103..241d5b30dfcb 100644 --- a/net/sunrpc/auth_gss/gss_spkm3_unseal.c +++ b/net/sunrpc/auth_gss/gss_spkm3_unseal.c | |||
@@ -120,9 +120,7 @@ spkm3_read_token(struct spkm3_ctx *ctx, | |||
120 | /* XXX: need to add expiration and sequencing */ | 120 | /* XXX: need to add expiration and sequencing */ |
121 | ret = GSS_S_COMPLETE; | 121 | ret = GSS_S_COMPLETE; |
122 | out: | 122 | out: |
123 | if (md5cksum.data) | 123 | kfree(md5cksum.data); |
124 | kfree(md5cksum.data); | 124 | kfree(wire_cksum.data); |
125 | if (wire_cksum.data) | ||
126 | kfree(wire_cksum.data); | ||
127 | return ret; | 125 | return ret; |
128 | } | 126 | } |
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 5a220b2bb376..e4296c8b861e 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -196,12 +196,9 @@ svc_exit_thread(struct svc_rqst *rqstp) | |||
196 | struct svc_serv *serv = rqstp->rq_server; | 196 | struct svc_serv *serv = rqstp->rq_server; |
197 | 197 | ||
198 | svc_release_buffer(rqstp); | 198 | svc_release_buffer(rqstp); |
199 | if (rqstp->rq_resp) | 199 | kfree(rqstp->rq_resp); |
200 | kfree(rqstp->rq_resp); | 200 | kfree(rqstp->rq_argp); |
201 | if (rqstp->rq_argp) | 201 | kfree(rqstp->rq_auth_data); |
202 | kfree(rqstp->rq_argp); | ||
203 | if (rqstp->rq_auth_data) | ||
204 | kfree(rqstp->rq_auth_data); | ||
205 | kfree(rqstp); | 202 | kfree(rqstp); |
206 | 203 | ||
207 | /* Release the server */ | 204 | /* Release the server */ |
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index 32df43372ee9..aaf08cdd19f0 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c | |||
@@ -992,8 +992,7 @@ xdr_xcode_array2(struct xdr_buf *buf, unsigned int base, | |||
992 | err = 0; | 992 | err = 0; |
993 | 993 | ||
994 | out: | 994 | out: |
995 | if (elem) | 995 | kfree(elem); |
996 | kfree(elem); | ||
997 | if (ppages) | 996 | if (ppages) |
998 | kunmap(*ppages); | 997 | kunmap(*ppages); |
999 | return err; | 998 | return err; |