[sr-dev] git:master:d7770cae: benchmark: properly free previous allocated memory in case of error