From ca0c9a60b0f7dc823ff01f77fc00458ab4a13532 Mon Sep 17 00:00:00 2001 From: David Timber Date: Tue, 15 Sep 2020 20:04:13 +0930 Subject: * Code consistency - take *_param_t as pointer * Fix *_param_t leak and memory error --- src/proone-recon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/proone-recon.c') diff --git a/src/proone-recon.c b/src/proone-recon.c index d8aa7aa..7f996f2 100644 --- a/src/proone-recon.c +++ b/src/proone-recon.c @@ -156,7 +156,7 @@ static void evt_cb (const prne_net_endpoint_t *ep) { int main (const int argc, const char **args) { int ret = 0; prne_recon_param_t param; - FILE *conf_f; + FILE *conf_f = NULL; bool own_conf_f = false; prne_worker_t wkr; prne_recon_t *recon; @@ -251,10 +251,12 @@ int main (const int argc, const char **args) { } // alloc recon + param.ownership = false; recon = prne_alloc_recon( &wkr, &ctr_drbg, - prne_own_recon_param(¶m, false)); + ¶m); + param.ownership = true; if (recon == NULL) { perror("prne_alloc_recon()"); ret = 2; -- cgit