aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/rsa.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cipher/rsa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cipher/rsa.c b/cipher/rsa.c
index 7eb757a97..e41ff2481 100644
--- a/cipher/rsa.c
+++ b/cipher/rsa.c
@@ -353,7 +353,8 @@ rsa_generate( int algo, unsigned nbits, MPI *skey, MPI **retfactors )
skey[4] = sk.q;
skey[5] = sk.u;
/* make an empty list of factors */
- *retfactors = m_alloc_clear( 1 * sizeof **retfactors );
+ if (retfactors)
+ *retfactors = m_alloc_clear( 1 * sizeof **retfactors );
return 0;
}