Skip to content

Commit 1654aba

Browse files
committed
Release buffer after export_name
The low-level `export_name` function was missing a call to `gss_release_buffer`, which could have resulted in a memory leak. This is now fixed.
1 parent 78165a6 commit 1654aba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

gssapi/raw/names.pyx

+1
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ def export_name(Name name not None):
235235
# force conversion to a python string with the specified length
236236
# (we use the slice to tell cython that we know the length already)
237237
res = exported_name.value[:exported_name.length]
238+
gss_release_buffer(&min_stat, &exported_name)
238239
return res
239240
else:
240241
raise GSSError(maj_stat, min_stat)

0 commit comments

Comments
 (0)