Fix crash if /var/lib/scst/pr not found

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3478 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2011-05-25 19:59:38 +00:00
parent aab99c0b0e
commit 4aee257140

View File

@@ -1182,7 +1182,8 @@ static int scst_pr_check_pr_path(void)
scst_pr_path_put(&nd);
#else
res = kern_path(SCST_PR_DIR, 0, &path);
path_put(&path);
if (res == 0)
path_put(&path);
#endif
if (res != 0) {
PRINT_ERROR("Unable to find %s (err %d), you should create "