Fixes
Merge pull request #502 from telefonicaid/hardening/sonar_memory_fixes

Sonar detected memory fixes