When I3SOCK is present, socket_path might be a pointer to an environment variable, which cannot be free'd in line 157. This commit duplicates the string if I3SOCK is present, thus making socket_path a free-able pointer again.