Skip to content

Commit

Permalink
Fix memory leak where Python object refcount not decremented.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Aug 8, 2024
1 parent eaf1784 commit e4e1999
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/release-notes/version-5.0.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ Bugs Fixed
* Fix issue which could result in process crashing when values were supplied
for user/password/realm of HTTP basic authentication which weren't compliant
with UTF-8 encoding format.

* Fix memory leak in `check_password()` authentication hook handler.
1 change: 1 addition & 0 deletions src/server/mod_wsgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -14926,6 +14926,7 @@ static authn_status wsgi_check_password(request_rec *r, const char *user,
if (str) {
adapter->r->user = apr_pstrdup(adapter->r->pool,
PyString_AsString(str));
Py_DECREF(str);

status = AUTH_GRANTED;
}
Expand Down

0 comments on commit e4e1999

Please sign in to comment.