summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index 38bf654..9f9eabe 100644
--- a/parse.c
+++ b/parse.c
@@ -429,6 +429,11 @@ static int expr_open(struct parser_state *state, struct expr *expr, const char *
bfs_stat_id(&sb, &id);
struct trie_leaf *leaf = trie_insert_mem(&cmdline->open_files, id, sizeof(id));
+ if (!leaf) {
+ perror("trie_insert_mem()");
+ goto out_close;
+ }
+
if (leaf->value) {
struct open_file *ofile = leaf->value;
expr->cfile = ofile->cfile;