forked from ariadne/pkgconf
inode cache: ensure we never use an unitilized struct stat
parent
e9b4c2c789
commit
2e855972dc
|
@ -89,8 +89,10 @@ pkgconf_path_add(const char *text, pkgconf_list_t *dirlist, bool filter)
|
||||||
node = calloc(sizeof(pkgconf_path_t), 1);
|
node = calloc(sizeof(pkgconf_path_t), 1);
|
||||||
node->path = strdup(text);
|
node->path = strdup(text);
|
||||||
#ifdef PKGCONF_CACHE_INODES
|
#ifdef PKGCONF_CACHE_INODES
|
||||||
node->handle_path = (void *)(intptr_t) st.st_ino;
|
if (filter) {
|
||||||
node->handle_device = (void *)(intptr_t) st.st_dev;
|
node->handle_path = (void *)(intptr_t) st.st_ino;
|
||||||
|
node->handle_device = (void *)(intptr_t) st.st_dev;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pkgconf_node_insert_tail(&node->lnode, node, dirlist);
|
pkgconf_node_insert_tail(&node->lnode, node, dirlist);
|
||||||
|
|
Loading…
Reference in New Issue