[sr-dev] git:master:d5ab93a1: statsc: convert to memory logging helper, free memory in case of error