pppd: Check tdb pointer before closing
authorAlfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com>
Thu, 6 Jun 2019 15:36:29 +0000 (17:36 +0200)
committerPaul Mackerras <paulus@ozlabs.org>
Sat, 19 Oct 2019 04:52:21 +0000 (15:52 +1100)
commitb6b4d28e0c38320ca6753af40845df991118cd11
treed0ce7ff5457a49e90f2d50f7df463bebfa8b6e80
parent0d004db25edd42f6720f48eedc51f68a781278db
pppd: Check tdb pointer before closing

Check that pointer to the tdb is not NULL before calling tdb_close().
It is possible that the file could not be opened/created due to
permission issues. This change prevents the crash that happens in that
case.

Signed-off-by: Alfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com>
pppd/main.c