diff options
author | Akira TAGOH <akira@tagoh.org> | 2019-11-02 00:14:48 +0900 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2019-11-06 14:21:34 +0900 |
commit | aa8c8cfa9fb2563482336249e3f56459099fcf6e (patch) | |
tree | 06f73d068d2ad45bfa97e815caeb8fb4164294ed /src/fccache.c | |
parent | b5bcf61fe789e66df2de609ec246cb7e4d326180 (diff) | |
download | fontconfig-aa8c8cfa9fb2563482336249e3f56459099fcf6e.tar.gz |
Fix potential race condition in FcConfigSetCurrent and FcConfigReference
Diffstat (limited to 'src/fccache.c')
-rw-r--r-- | src/fccache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fccache.c b/src/fccache.c index d8f1dab..4744a84 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -1085,6 +1085,8 @@ FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat) if (fd < 0) return NULL; config = FcConfigReference (NULL); + if (!config) + return NULL; cache = FcDirCacheMapFd (config, fd, file_stat, NULL); FcConfigDestroy (config); close (fd); |