You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by sc...@apache.org on 2010/05/17 00:02:29 UTC
svn commit: r944923 -
/xml/security/trunk/c/src/tools/templatesign/templatesign.cpp
Author: scantor
Date: Sun May 16 22:02:28 2010
New Revision: 944923
URL: http://svn.apache.org/viewvc?rev=944923&view=rev
Log:
Fix shutdown crash.
Modified:
xml/security/trunk/c/src/tools/templatesign/templatesign.cpp
Modified: xml/security/trunk/c/src/tools/templatesign/templatesign.cpp
URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/tools/templatesign/templatesign.cpp?rev=944923&r1=944922&r2=944923&view=diff
==============================================================================
--- xml/security/trunk/c/src/tools/templatesign/templatesign.cpp (original)
+++ xml/security/trunk/c/src/tools/templatesign/templatesign.cpp Sun May 16 22:02:28 2010
@@ -1132,12 +1132,10 @@ int main(int argc, char **argv) {
// Use the internal URI resolver
#if defined(_WIN32)
- XSECURIResolverGenericWin32
+ XSECURIResolverGenericWin32* theResolver = new XSECURIResolverGenericWin32();
#else
- XSECURIResolverGenericUnix
-#endif
- theResolver;
-
+ XSECURIResolverGenericUnix* theResolver = new XSECURIResolverGenericUnix();
+#endif
// Map out base path of the file
char * filename=argv[argc-1];
@@ -1172,8 +1170,8 @@ int main(int argc, char **argv) {
// The last "\\" must prefix the filename
baseURI[lastSlash + 1] = '\0';
- theResolver.setBaseURI(MAKE_UNICODE_STRING(baseURI));
- sig->setURIResolver(&theResolver);
+ theResolver->setBaseURI(MAKE_UNICODE_STRING(baseURI));
+ sig->setURIResolver(theResolver);
try {
sig->load();
@@ -1360,6 +1358,7 @@ int main(int argc, char **argv) {
prov->releaseSignature(sig);
delete parser;
delete prov;
+ delete theResolver;
XSECPlatformUtils::Terminate();
#ifndef XSEC_NO_XALAN