]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - sshrsa.c
Remove some redundant null-pointer checks from code that must have
[PuTTY.git] / sshrsa.c
index 078536467664ce2f5952ae686f978808db8b39aa..3bd971f8d0516ec7e194dba9a8446f907c919993 100644 (file)
--- a/sshrsa.c
+++ b/sshrsa.c
@@ -558,8 +558,6 @@ static void *rsa2_newkey(char *data, int len)
     struct RSAKey *rsa;
 
     rsa = snew(struct RSAKey);
-    if (!rsa)
-       return NULL;
     getstring(&data, &len, &p, &slen);
 
     if (!p || slen != 7 || memcmp(p, "ssh-rsa", 7)) {
@@ -694,8 +692,6 @@ static void *rsa2_openssh_createkey(unsigned char **blob, int *len)
     struct RSAKey *rsa;
 
     rsa = snew(struct RSAKey);
-    if (!rsa)
-       return NULL;
     rsa->comment = NULL;
 
     rsa->modulus = getmp(b, len);