--- a/cupsppd.c +++ b/cupsppd.c @@ -236,10 +236,13 @@ static void PPD_dealloc (PPD *self) { - debugprintf ("- PPD %p (fd %d)\n", self, fileno (self->file)); - - if (self->file) + if (!self) + return; + if (self->file) { + debugprintf ("- PPD %p (fd %d)\n", self, fileno (self->file)); fclose (self->file); + } else + debugprintf ("- PPD %p (no fd)\n", self); if (self->ppd) ppdClose (self->ppd); if (self->conv_from)