]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/pqueue/pqueue.c
Add and use OPENSSL_zalloc
[thirdparty/openssl.git] / crypto / pqueue / pqueue.c
index d10088e1f9abf11ab72b78c8a27296ffc5e91d49..b6e19c7f52d047e7645d6b718bdcad124586c136 100644 (file)
@@ -87,11 +87,8 @@ void pitem_free(pitem *item)
 
 pqueue_s *pqueue_new()
 {
-    pqueue_s *pq = OPENSSL_malloc(sizeof(*pq));
-    if (pq == NULL)
-        return NULL;
+    pqueue_s *pq = OPENSSL_zalloc(sizeof(*pq));
 
-    memset(pq, 0, sizeof(*pq));
     return pq;
 }