Addresses: https://github.com/util-linux/util-linux/pull/3356
Signed-off-by: Karel Zak <kzak@redhat.com>
&& errno != EEXIST) {
DBG(SAVE, ul_debug("can't create %s directory for cache file",
BLKID_RUNTIME_DIR));
- return 0;
+ ret = 0;
+ goto done;
}
}
if (((ret = stat(filename, &st)) < 0 && errno != ENOENT) ||
(ret == 0 && access(filename, W_OK) < 0)) {
DBG(SAVE, ul_debug("can't write to cache file %s", filename));
- return 0;
+ ret = 0;
+ goto done;
}
/*
if (!file) {
ret = errno;
- goto errout;
+ goto done;
}
list_for_each(p, &cache->bic_devs) {
}
}
-errout:
+done:
free(tmp);
if (filename != cache->bic_filename)
free(filename);