aboutsummaryrefslogtreecommitdiff
path: root/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'tree.c')
-rw-r--r--tree.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tree.c b/tree.c
index b2819f0..6238348 100644
--- a/tree.c
+++ b/tree.c
@@ -288,8 +288,11 @@ static bool
288stack_pop(struct stack *stack, struct tree_node **data) 288stack_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