diff options
Diffstat (limited to 'tree.c')
| -rw-r--r-- | tree.c | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -288,8 +288,11 @@ static bool | |||
| 288 | stack_pop(struct stack *stack, struct tree_node **data) | 288 | stack_pop(struct stack *stack, struct tree_node **data) |
| 289 | { | 289 | { |
| 290 | if ( stack->head != NULL ) { | 290 | if ( stack->head != NULL ) { |
| 291 | struct stack_item *next = stack->head->next; | 291 | struct stack_item *next; |
| 292 | *data = stack->head->data; | 292 | |
| 293 | next = stack->head->next; | ||
| 294 | *data = stack->head->data; | ||
| 295 | |||
| 293 | free(stack->head); | 296 | free(stack->head); |
| 294 | stack->head = next; | 297 | stack->head = next; |
| 295 | 298 | ||
