From 24250c7aa6b4b5c1b6ff87f12d93730d2c8dd04b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 29 Sep 2009 11:08:32 +0200 Subject: [PATCH] libblkid: fix the default cache file path The blkid_get_cache_filename() can returns BLKID_CONFIG_FILE instead BLKID_CACHE_FILE. Yeah, pretty stupid typo. Fortunately, this brown-paper-bag bug is invisible in almost all cases, because the default path is returned by blkid_read_config(). The bug can be visible only when blkid_read_config() returns NULL -- it means on parses or malloc error. Signed-off-by: Karel Zak --- shlibs/blkid/src/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shlibs/blkid/src/cache.c b/shlibs/blkid/src/cache.c index 7f983ed7..e71176b5 100644 --- a/shlibs/blkid/src/cache.c +++ b/shlibs/blkid/src/cache.c @@ -134,7 +134,7 @@ char *blkid_get_cache_filename(struct blkid_config *conf) else { struct blkid_config *c = blkid_read_config(NULL); if (!c) - filename = blkid_strdup(BLKID_CONFIG_FILE); + filename = blkid_strdup(BLKID_CACHE_FILE); else { filename = c->cachefile; /* already allocated */ c->cachefile = NULL; -- 2.39.5