# Memory leak on ngx\_http\_auth\_pam\_module

**URL:** <https://www.ruby-forum.com/t/memory-leak-on-ngx-http-auth-pam-module/199192>\
**Category:** NGINX\
**Created:** [November 16, 2010, 2:59pm UTC](https://www.ruby-forum.com/t/memory-leak-on-ngx-http-auth-pam-module/199192 "2010-11-16T14:59:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [November 16, 2010, 2:59pm UTC](https://www.ruby-forum.com/t/memory-leak-on-ngx-http-auth-pam-module/199192/1 "2010-11-16T14:59:37Z")

</div>

This weekend Neil C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) reported me a bug on  
the  
ngx\_http\_auth\_pam\_module; the problem was that the current code was not  
calling pam\_end() when there was an authentication failure, returning  
without  
freeing the memory allocated by the pam transaction operations.

The updated code is available on:

[http://web.iti.upv.es/~sto/nginx/ngx\_http\_auth\_pam\_module-1.2.tar.gz](http://web.iti.upv.es/~sto/nginx/ngx_http_auth_pam_module-1.2.tar.gz)

Users of the module should upgrade if they want to avoid the memory  
leak.

Sergio.

–  
Sergio Talens-Oliag [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[http://www.iti.upv.es/](http://www.iti.upv.es/)  
Key fingerprint = FF77 A16B 9D09 FC7B 6656 CFAD 261D E19A 578A 36F2
