Skip to content

Commit

Permalink
* src/get.c: fix possible NULL dereference
Browse files Browse the repository at this point in the history
Reported in #218 by ggardella
  • Loading branch information
lutter committed Apr 20, 2015
1 parent b5c05be commit 9b5f856
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/get.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,7 @@ static struct tree *get_subtree(struct lens *lens, struct state *state) {
children = get_lens(lens->child, state);

tree = make_tree(state->key, state->value, NULL, children);
ERR_NOMEM(tree == NULL, state->info);
tree->span = state->span;

if (state->span != NULL) {
Expand Down

0 comments on commit 9b5f856

Please sign in to comment.