Skip to content

Commit e4e1999

Browse files
Fix memory leak where Python object refcount not decremented.
1 parent eaf1784 commit e4e1999

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

docs/release-notes/version-5.0.1.rst

+2
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ Bugs Fixed
1212
* Fix issue which could result in process crashing when values were supplied
1313
for user/password/realm of HTTP basic authentication which weren't compliant
1414
with UTF-8 encoding format.
15+
16+
* Fix memory leak in `check_password()` authentication hook handler.

src/server/mod_wsgi.c

+1
Original file line numberDiff line numberDiff line change
@@ -14926,6 +14926,7 @@ static authn_status wsgi_check_password(request_rec *r, const char *user,
1492614926
if (str) {
1492714927
adapter->r->user = apr_pstrdup(adapter->r->pool,
1492814928
PyString_AsString(str));
14929+
Py_DECREF(str);
1492914930

1493014931
status = AUTH_GRANTED;
1493114932
}

0 commit comments

Comments
 (0)