Index: src/Parser/LinkageSpec.cc
===================================================================
--- src/Parser/LinkageSpec.cc	(revision a839867aa05de5183603a81f701042bcfbc86194)
+++ src/Parser/LinkageSpec.cc	(revision f2a4f6c0e35f3af279f31bc44d189f869d703461)
@@ -14,4 +14,5 @@
 //
 
+#include <memory>
 #include <string>
 #include <cassert>
@@ -21,4 +22,5 @@
 
 LinkageSpec::Spec LinkageSpec::fromString( const std::string &spec ) {
+	std::unique_ptr<const std::string> guard(&spec);		// allocated by lexer
 	if ( spec == "\"Cforall\"" ) {
 		return Cforall;
@@ -28,5 +30,4 @@
 		throw SemanticError( "Invalid linkage specifier " + spec );
 	} // if
-	delete &spec;										// allocated by lexer
 }
 
