SpiderLabs/ModSecurity — pull request #620 by thehelix112 (2013-12-17 00:46:13+00:00)
Title: Add independent modsecFinishConnection API that allows you to independen...

This adds an independent API call to free the connection allocations, independently from the request objects. Additionally updates the existing modsecFinishRequest to only free up the request's allocations.

This should facilitate better memory management by user libraries (though this is not in this pull request) to not needlessly reallocate connection objects on a per-request basis.

I tested that this builds properly using nginx stable (1.4.4).

```
objs/addon/modsecurity/ngx_http_modsecurity.o \
objs/addon/modsecurity/apr_bucket_nginx.o \
objs/addon/modsecurity/ngx_pool_context.o \
objs/ngx_modules.o \
-lpthread -lcrypt ../ModSecurity/nginx/modsecurity/../../standalone/.libs/standalone.a -L/usr/lib -lapr-1 -L/usr/lib -laprutil-1 -L/usr/lib/x86_64-linux-gnu -lpcre -L/usr/lib/x86_64-linux-gnu -lxml2 -llua5.1 -lpcre -lcrypto -lcrypto -lz -lfuzzy
make[1]: Leaving directory `~/Work/dev/git/nginx-1.4.4'
make -f objs/Makefile manpage
make[1]: Entering directory `~/Work/dev/git/nginx-1.4.4'
sed -e "s|%%PREFIX%%|/usr/local/nginx|" \
-e "s|%%PID_PATH%%|/usr/local/nginx/logs/nginx.pid|" \
-e "s|%%CONF_PATH%%|/usr/local/nginx/conf/nginx.conf|" \
-e "s|%%ERROR_LOG_PATH%%|/usr/local/nginx/logs/error.log|" \
< man/nginx.8 > objs/nginx.8
make[1]: Leaving directory `~/Work/dev/git/nginx-1.4.4'
~/Work/dev/git/nginx-1.4.4$
```