snprintf requires malloc before copying strings. I didn't do enough test the case when socket names were not given via environment variable.