diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.35/src/matchpathcon.c --- nsalibselinux/src/matchpathcon.c 2007-09-18 16:27:25.000000000 -0400 +++ libselinux-2.0.35/src/matchpathcon.c 2007-09-27 13:50:55.000000000 -0400 @@ -305,8 +306,10 @@ void matchpathcon_fini(void) { - selabel_close(hnd); - hnd = NULL; + if (hnd) { + selabel_close(hnd); + hnd = NULL; + } } int matchpathcon(const char *name, mode_t mode, security_context_t * con)