tool_paramhlp: Fixed compilation warnings

declaration of 'index' shadows a global declaration
easy: Fixed a memory leak on OOM condition