]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Always treat failure to allocate an RSA key as an unrecoverable allocation error
authorNick Mathewson <nickm@torproject.org>
Tue, 25 Jan 2011 23:19:09 +0000 (18:19 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 25 Jan 2011 23:19:09 +0000 (18:19 -0500)
changes/bug2378 [new file with mode: 0644]
src/common/crypto.c

diff --git a/changes/bug2378 b/changes/bug2378
new file mode 100644 (file)
index 0000000..a3ae196
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor code simplifications and refactorings
+    - Always treat failure to allocate an RSA key as an unrecoverable
+      allocation error.
index 4223b10a7f683e7e83f54e7cb8dc17dc00091d86..09d7fc886b15c0a4aca19f374dc04ad297bb3161 100644 (file)
@@ -379,7 +379,7 @@ crypto_new_pk_env(void)
   RSA *rsa;
 
   rsa = RSA_new();
-  if (!rsa) return NULL;
+  tor_assert(rsa);
   return _crypto_new_pk_env_rsa(rsa);
 }