>From 2d9940379927d2536675a7970f16767e4d209f27 Mon Sep 17 00:00:00 2001 From: Nicolas Iooss Date: Fri, 3 Jan 2014 22:47:17 +0100 Subject: [PATCH] Fix segmentation fault in restorecon_private --- src/selinux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/selinux.c b/src/selinux.c index cd38a81..e4deba3 100644 --- a/src/selinux.c +++ b/src/selinux.c @@ -190,7 +190,7 @@ restorecon_private (char const *path, bool local) if (local) { - if (getfscreatecon (&tcon) < 0) + if (getfscreatecon (&tcon) < 0 || tcon == NULL) return rc; rc = lsetfilecon (path, tcon); freecon (tcon); -- 1.8.5.2