Resolve memory leak caused due to image name