From 1b4eda3af96a7fb53a327fb3325670a14ff02213 Mon Sep 17 00:00:00 2001 From: Alfred Klomp Date: Mon, 14 Jul 2014 22:07:34 +0200 Subject: [PATCH] pkcs5.c: fix dead store: return proper exit status Found with Clang's `scan-build` tool. The error value assigned to `ret` is not returned, meaning that the selftest always succeeds. Ensure the error value is propagated back to the caller. --- library/pkcs5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/pkcs5.c b/library/pkcs5.c index e769783ee..e2c4e48c7 100644 --- a/library/pkcs5.c +++ b/library/pkcs5.c @@ -408,7 +408,7 @@ int pkcs5_self_test( int verbose ) exit: md_free( &sha1_ctx ); - return( 0 ); + return( ret ); } #endif /* POLARSSL_SHA1_C */