From 5912d0f57af35f18a394db4787b3f2c7b0016f3f Mon Sep 17 00:00:00 2001 From: Martijn van Brummelen Date: Fri, 5 Oct 2018 23:02:19 +0200 Subject: [PATCH] check right pointer --- README | 3 ++- src/method.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README b/README index 1f2fd07..2e24d8c 100644 --- a/README +++ b/README @@ -21,7 +21,8 @@ RELEASE NOTES v0.25 - Correct J=Up K=Down in footer(Thanks PartialVolume) - Fix segfault initialize nwipe_gui_thread (Thanks PartialVolume) -- Fix memory leaks (Thanks Partialvolume) +- Fix memory leaks (Thanks PartialVolume) +- Check right pointer (Thanks PartialVolume v0.24 - use include values for version 0.17 diff --git a/src/method.c b/src/method.c index 03a523f..716557d 100644 --- a/src/method.c +++ b/src/method.c @@ -416,7 +416,7 @@ void *nwipe_ops2( void *ptr ) /* Allocate the array of complement characters. */ t = malloc( sizeof( char ) * u ); - if( s == NULL ) + if( t == NULL ) { nwipe_perror( errno, __FUNCTION__, "malloc" ); nwipe_log( NWIPE_LOG_FATAL, "Unable to allocate the complement character array." );