wmail: fixed NULL-pointer dereference if opendir(3) fails.
commit40d7eb504ca248610c99cf3f6e95f7727df59fd5
authorJeremy Sowden <jeremy@azazel.net>
Fri, 21 Jun 2019 10:50:31 +0000 (21 11:50 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Fri, 21 Jun 2019 11:28:08 +0000 (21 12:28 +0100)
treecc90d6f360e1b095fb847107128ea2cfde34f432
parent2ae0c7cba401c88d4c1d0424d440076388abc818
wmail: fixed NULL-pointer dereference if opendir(3) fails.

Code was:

  if (( dir = opendir( ... )))
  {
    // ...
  }
  closedir( dir ); // dir may be NULL

Moved closedir(3) inside if-block.
wmail/src/wmail.c