--- pk7_doit.c.orig	2016-03-03 10:08:08.316625383 -0800
+++ pk7_doit.c	2016-03-03 10:09:19.093620776 -0800
@@ -642,6 +642,8 @@
     } else {
 # if 0
         bio = BIO_new(BIO_s_mem());
+	if (bio == NULL)
+	    goto err;
         /*
          * We need to set this so that when we have read all the data, the
          * encrypt BIO, if present, will read EOF and encode the last few
