Fixes a crash when freeing a const gchar *