From 499ad925aedc8b593ba7bb739cccd7ab2fb68079 Mon Sep 17 00:00:00 2001 From: PartialVolume <22084881+PartialVolume@users.noreply.github.com> Date: Thu, 2 Nov 2023 19:47:53 +0000 Subject: [PATCH] Fix_segfault_on_first_run_as_non_root Incorrectly trying to close a uninitialised file pointer stream when the file could not be opened. --- src/conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf.c b/src/conf.c index f4de661c..13deffa4 100644 --- a/src/conf.c +++ b/src/conf.c @@ -186,8 +186,8 @@ int nwipe_conf_init() { nwipe_log( NWIPE_LOG_ERROR, "Failed to write basic config to %s", nwipe_customers_file ); } + fclose( fp_customers ); } - fclose( fp_customers ); } return ( 0 ); }