use the correct pointer to free the string. Thx to Hartmut for spotting this bug