Use safer sizeof variant in malloc
[openssl.git] / demos / state_machine / state_machine.c
index f8a7da80d938250b7b012bbac28c24eca1ccc987..cd990b23d4e81a9800e4db5d34648e11b6e94283 100644 (file)
@@ -114,7 +114,7 @@ void SSLStateMachine_print_error(SSLStateMachine * pMachine,
 SSLStateMachine *SSLStateMachine_new(const char *szCertificateFile,
                                      const char *szKeyFile)
 {
-    SSLStateMachine *pMachine = malloc(sizeof *pMachine);
+    SSLStateMachine *pMachine = malloc(sizeof(*pMachine));
     int n;
 
     die_unless(pMachine);