diff options
-rw-r--r-- | yarp/yarp.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/yarp/yarp.c b/yarp/yarp.c index ad433efc4b..8cd2c2007b 100644 --- a/yarp/yarp.c +++ b/yarp/yarp.c @@ -4902,14 +4902,9 @@ context_push(yp_parser_t *parser, yp_context_t context) { static void context_pop(yp_parser_t *parser) { - if (parser->current_context->prev == NULL) { - free(parser->current_context); - parser->current_context = NULL; - } else { - yp_context_node_t *prev = parser->current_context->prev; - free(parser->current_context); - parser->current_context = prev; - } + yp_context_node_t *prev = parser->current_context->prev; + free(parser->current_context); + parser->current_context = prev; } static bool |