]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't need the memset 2413/head
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 25 Jan 2019 09:03:54 +0000 (16:03 +0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 25 Jan 2019 09:03:54 +0000 (16:03 +0700)
src/lib/tls/missing.h

index d2dbda5e550775ad5040112c975bd1bb27809fc2..5bec574acdace4bf6281d30fa29ffae340a79597 100644 (file)
 static inline HMAC_CTX *HMAC_CTX_new(void)
 {
        HMAC_CTX *ctx;
-       ctx = OPENSSL_malloc(sizeof(*ctx));
+
+       ctx = OPENSSL_malloc(sizeof(*ctx));     /* Between HMAC_ctx_init and HMAC_init everything is zeroed */
        if (!ctx) return NULL;
 
-       memset(ctx, 0, sizeof(*ctx));
        HMAC_CTX_init(ctx);
        return ctx;
 }