From 33690b9e37820473f081f36edfff010faec5ffec Mon Sep 17 00:00:00 2001 From: PartialVolume Date: Thu, 23 Apr 2020 22:47:50 +0100 Subject: [PATCH] Fix memory leak Detected by cppcheck --- src/nwipe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nwipe.c b/src/nwipe.c index 6650720..e00f890 100644 --- a/src/nwipe.c +++ b/src/nwipe.c @@ -145,6 +145,7 @@ int main( int argc, char** argv ) nwipe_perror( errno, __FUNCTION__, "open" ); nwipe_log( NWIPE_LOG_FATAL, "Unable to open entropy source %s.", NWIPE_KNOB_ENTROPY ); cleanup(); + free( c2 ); return errno; }