From 9ab2ff6874db0182714d8c09dceda9ee22e177f8 Mon Sep 17 00:00:00 2001 From: zhangtianxing Date: Fri, 6 Sep 2019 19:09:13 +0800 Subject: [PATCH] fix the core file problem Reason: fix the core file problem Signed-off-by: zhangtianxing --- src/haveged.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/haveged.c b/src/haveged.c index e061079..daf81c9 100644 --- a/src/haveged.c +++ b/src/haveged.c @@ -470,6 +470,7 @@ int main(int argc, char **argv) else run_daemon(handle, path, argv); #endif havege_destroy(handle); + handle = NULL; exit(0); } #ifndef NO_DAEMON @@ -706,6 +707,7 @@ void error_exit( /* RETURN: nothing */ } } havege_destroy(handle); + handle = NULL; exit(params->exit_code); } /** -- 2.19.1