From b925d770ed653757edb59e32e6069b626d13bcae Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 14 Mar 2018 20:39:28 +0100 Subject: [PATCH] client: Remove unused ->config_file member. Currently we store a copy of the config file path in the client task structure for no reason at all. Remove it. --- client.h | 2 -- client_common.c | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/client.h b/client.h index f8cc5d64..7ba56b91 100644 --- a/client.h +++ b/client.h @@ -36,8 +36,6 @@ struct client_task { unsigned char *challenge_hash; /** The parsed command line (including the command). */ struct lls_parse_result *lpr; - /** The config file for client options. */ - char *config_file; /** The RSA private key. */ char *key_file; /** Paraslash user name. */ diff --git a/client_common.c b/client_common.c index 261dc833..a8d48055 100644 --- a/client_common.c +++ b/client_common.c @@ -40,7 +40,6 @@ void client_close(struct client_task *ct) if (!ct) return; free(ct->user); - free(ct->config_file); free(ct->key_file); lls_free_parse_result(ct->lpr, CLIENT_CMD_PTR); free(ct->challenge_hash); @@ -595,18 +594,17 @@ int client_parse_config(int argc, char *argv[], struct client_task **ct_ptr, ct->scc.fd = -1; ct->lpr = lpr; ct->key_file = kf; - ct->config_file = cf; ct->user = user; *ct_ptr = ct; ret = lls_num_inputs(lpr); out: free(home); + free(cf); if (ret < 0) { if (errctx) PARA_ERROR_LOG("%s\n", errctx); free(errctx); lls_free_parse_result(lpr, cmd); - free(cf); free(kf); *ct_ptr = NULL; } -- 2.39.2