};
PARA_NOTICE_LOG("\n%s\n", version_text("client"));
- if (CLIENT_OPT_GIVEN(HISTORY_FILE, ct->lpr))
- ici.history_file = para_strdup(CLIENT_OPT_STRING_VAL(
- HISTORY_FILE, ct->lpr));
- else {
- char *home = para_homedir();
- ici.history_file = make_message("%s/.paraslash/client.history",
- home);
- free(home);
- }
+ ici.history_file = CLIENT_OPT_GIVEN(HISTORY_FILE, ct->lpr)?
+ para_strdup(CLIENT_OPT_STRING_VAL(HISTORY_FILE, ct->lpr)) :
+ make_message("%s/client.history", get_confdir());
act.sa_handler = i9e_signal_dispatch;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
i9e_close();
para_log = stderr_log;
out:
+ free(ici.history_file);
if (ret < 0)
PARA_ERROR_LOG("%s\n", para_strerror(-ret));
exit(ret < 0? EXIT_FAILURE : EXIT_SUCCESS);
/* these are not errors */
case -E_SERVER_CMD_SUCCESS:
case -E_EOF:
- case -E_SERVER_EOF:
- case -E_BTR_EOF:
ret = 0;
break;
default: ret = -E_SERVER_CMD_FAILURE;
client_close(ct);
btr_remove_node(&sit.btrn);
btr_remove_node(&sot.btrn);
+ free(get_confdir());
return ret < 0? EXIT_FAILURE : EXIT_SUCCESS;
}