Fixes warnings reported by VS2013 analyzer.
Fixes warnings reported by VS2013 analyzer.

Mostly, using a just freed buffer in case of errors in
Crypto module.

ichramm/LuaNode,ichramm/LuaNode,ignacio/LuaNode,ignacio/LuaNode,ichramm/LuaNode,ignacio/LuaNode,ichramm/LuaNode,ignacio/LuaNode