This commit is contained in:
Ward Fisher 2012-09-14 22:54:55 +00:00
parent 6504c2b093
commit cb10672d0d

View File

@ -1780,7 +1780,9 @@ ncio_px_close(ncio *nciop, int doUnlink)
if(nciop == NULL) if(nciop == NULL)
return EINVAL; return EINVAL;
status = nciop->sync(nciop); status = nciop->sync(nciop);
(void) close(nciop->fd); if(nciop->fd > 0) {
(void) close(nciop->fd);
}
if(doUnlink) if(doUnlink)
(void) unlink(nciop->path); (void) unlink(nciop->path);
ncio_px_free(nciop); ncio_px_free(nciop);