diff options
author | David Timber <mieabby@gmail.com> | 2020-09-15 20:04:13 +0930 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-09-15 20:04:13 +0930 |
commit | ca0c9a60b0f7dc823ff01f77fc00458ab4a13532 (patch) | |
tree | f361382866540b5666a74084133cd2fb51f16e71 /src/proone-recon.c | |
parent | d06a39d44741355e96ee96d8f760b995f35abaed (diff) |
* Code consistency - take *_param_t as pointer
* Fix *_param_t leak and memory error
Diffstat (limited to 'src/proone-recon.c')
-rw-r--r-- | src/proone-recon.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; |