X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=client.c;h=84b7580cf9554c433651da1f3eed28a6f1f39a74;hb=refs%2Fheads%2Fpu;hp=d2d11fd34344d5b4f5186daf568850fe153cbacb;hpb=fdeca7261696df2bd189faff26b6cbf3004c808e;p=paraslash.git diff --git a/client.c b/client.c index d2d11fd3..661aff8f 100644 --- a/client.c +++ b/client.c @@ -525,15 +525,9 @@ __noreturn static void interactive_session(void) }; 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; @@ -681,5 +675,6 @@ out: client_close(ct); btr_remove_node(&sit.btrn); btr_remove_node(&sot.btrn); + free(get_confdir()); return ret < 0? EXIT_FAILURE : EXIT_SUCCESS; }