X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=fastcgi%2Fshibresponder.cpp;h=5783f4ba2c3c1a73f170875d39bb5f10335ba3b5;hb=a00fead8c3a2f0222918936ecfeb98e1f92bbbd2;hp=030d6cbe3678dec88310998d266753e3551d17b0;hpb=43227b572c1c19aaf351ac4f629fac15e7b8f93f;p=shibboleth%2Fcpp-sp.git diff --git a/fastcgi/shibresponder.cpp b/fastcgi/shibresponder.cpp index 030d6cb..5783f4b 100644 --- a/fastcgi/shibresponder.cpp +++ b/fastcgi/shibresponder.cpp @@ -343,8 +343,9 @@ int main(void) // Although FastCGI supports writing before reading, // many http clients (browsers) don't support it (so // the connection deadlocks until a timeout expires!). - char* content; + char* content = nullptr; gstdin(&request, &content); + auto_arrayptr wrapper(content); try { xmltooling::NDC ndc("FastCGI shibresponder"); @@ -384,8 +385,6 @@ int main(void) print_error("FastCGI Shibboleth responder caught an exception, check log for details."); } - delete[] content; - // If the output streambufs had non-zero bufsizes and // were constructed outside of the accept loop (i.e. // their destructor won't be called here), they would