Fixing memory leaks observed in Rhosydd
requested to merge HattihalBasavanaGowda.Chethan/rhosydd:wip/rhosydd/memory_leaks into apertis/v2022dev0
While reviewing the rhosydd code observed few memory leak conditions, I have updated the source code to fix the same.