FreeBSD Bugzilla – Attachment 204507 Details for
Bug 238020
Memory leak in function gss_release_oid_set in crypto/heimdal/lib/gssapi/mech/gss_release_oid_set.c
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Fix-a-memory-leak-in-gss_release_oid_set.patch (text/plain), 1.26 KB, created by
Young
on 2019-05-21 12:34:19 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Young
Created:
2019-05-21 12:34:19 UTC
Size:
1.26 KB
patch
obsolete
>From f9d48e1aac79834e145f5fd1334d20a182827525 Mon Sep 17 00:00:00 2001 >From: Young Xiao <92siuyang@gmail.com> >Date: Tue, 21 May 2019 20:34:43 +0800 >Subject: [PATCH] Fix a memory leak in gss_release_oid_set > >Signed-off-by: Young Xiao <92siuyang@gmail.com> >--- > .../heimdal/lib/gssapi/mech/gss_release_oid_set.c | 22 ++++++++++++++++------ > 1 file changed, 16 insertions(+), 6 deletions(-) > >diff --git a/crypto/heimdal/lib/gssapi/mech/gss_release_oid_set.c b/crypto/heimdal/lib/gssapi/mech/gss_release_oid_set.c >index 183ddf8..2d16552 100644 >--- a/crypto/heimdal/lib/gssapi/mech/gss_release_oid_set.c >+++ b/crypto/heimdal/lib/gssapi/mech/gss_release_oid_set.c >@@ -30,15 +30,25 @@ > > GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL > gss_release_oid_set(OM_uint32 *minor_status, >- gss_OID_set *set) >+ gss_OID_set *setp) > { >+ gss_OID_set set; >+ gss_OID o; >+ size_t i; > > *minor_status = 0; >- if (set && *set) { >- if ((*set)->elements) >- free((*set)->elements); >- free(*set); >- *set = GSS_C_NO_OID_SET; >+ if (setp) { >+ set = *setp; >+ if (set) { >+ for (i = 0; i < set->count; i++) { >+ o = &set->elements[i]; >+ if (o->elements) >+ free(o->elements); >+ } >+ free(set->elements); >+ free(set); >+ *setp = GSS_C_NO_OID_SET; >+ } > } > return (GSS_S_COMPLETE); > } >-- >2.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 238020
: 204507