Fix for coverity #29377: Properly free memory of 's'