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>
/* Executing in the child */
sys_close();
#ifdef USE_TDB
/* Executing in the child */
sys_close();
#ifdef USE_TDB
+ if (pppdb != NULL)
+ tdb_close(pppdb);
#endif
/* make sure infd, outfd and errfd won't get tromped on below */
#endif
/* make sure infd, outfd and errfd won't get tromped on below */