crypto/mem_dbg.c:647: error: NULL_DEREFERENCE
  pointer `lcl` last assigned on line 644 could be null and is dereferenced at line 647, column 22.
Showing all 7 steps of the trace


crypto/mem_dbg.c:629:1: start of procedure print_leak_doall_arg()
627.   } MEM_LEAK;
628.   
629. > static void print_leak_doall_arg(const MEM *m, MEM_LEAK *l)
630.   {
631.       char buf[1024];

crypto/mem_dbg.c:632:5: 
630.   {
631.       char buf[1024];
632. >     char *bufp = buf;
633.       APP_INFO *amip;
634.       int ami_cnt;

crypto/mem_dbg.c:635:5: 
633.       APP_INFO *amip;
634.       int ami_cnt;
635. >     struct tm *lcl = NULL;
636.       CRYPTO_THREADID ti;
637.   

crypto/mem_dbg.c:640:9: Taking false branch
638.   #define BUF_REMAIN (sizeof buf - (size_t)(bufp - buf))
639.   
640.       if (m->addr == (char *)l->bio)
               ^
641.           return;
642.   

crypto/mem_dbg.c:643:9: Taking true branch
641.           return;
642.   
643.       if (options & V_CRYPTO_MDEBUG_TIME) {
               ^
644.           lcl = localtime(&m->time);
645.   

crypto/mem_dbg.c:644:9: 
642.   
643.       if (options & V_CRYPTO_MDEBUG_TIME) {
644. >         lcl = localtime(&m->time);
645.   
646.           BIO_snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ",

crypto/mem_dbg.c:646:9: 
644.           lcl = localtime(&m->time);
645.   
646. >         BIO_snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ",
647.                        lcl->tm_hour, lcl->tm_min, lcl->tm_sec);
648.           bufp += strlen(bufp);
