From 67ef808a959c9180864ce79ff633851f28548212 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 6 Aug 2018 08:49:01 +0200 Subject: [PATCH] tests: Add additional NULL check in torture_pki_rsa_write_privkey() CID 1393904 CID 1393903 Signed-off-by: Andreas Schneider --- tests/unittests/torture_pki_rsa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unittests/torture_pki_rsa.c b/tests/unittests/torture_pki_rsa.c index c265f88c..8ee74dea 100644 --- a/tests/unittests/torture_pki_rsa.c +++ b/tests/unittests/torture_pki_rsa.c @@ -326,6 +326,7 @@ static void torture_pki_rsa_duplicate_key(void **state) NULL, &privkey); assert_true(rc == 0); + assert_non_null(privkey); privkey_dup = ssh_key_dup(privkey); assert_true(privkey_dup != NULL); @@ -460,6 +461,7 @@ static void torture_pki_rsa_write_privkey(void **state) NULL, &privkey); assert_true(rc == 0); + assert_non_null(privkey); rc = ssh_key_cmp(origkey, privkey, SSH_KEY_CMP_PRIVATE); assert_true(rc == 0);