preproc.c: free expansion definitions as needed
authorKeith Kanios <keith@kanios.net>
Sat, 18 Dec 2010 17:47:28 +0000 (11:47 -0600)
committerKeith Kanios <keith@kanios.net>
Sat, 18 Dec 2010 17:47:28 +0000 (11:47 -0600)
preproc.c

index 6a9e238..278e1dd 100644 (file)
--- a/preproc.c
+++ b/preproc.c
@@ -5188,22 +5188,9 @@ static char *pp_getline(void)
                         }
                         if (ed->cur_depth > 0) {
                             ed->cur_depth --;
-                        } else if ((ed->type != EXP_MMACRO) && (ed->type != EXP_IF)) {
-                            /***** should this really be right here??? *****/
-                            /*
-                            Line *l = NULL, *ll = NULL;
-                            for (l = ed->line; l != NULL;) {
-                                if (l->first != NULL) {
-                                    free_tlist(l->first);
-                                    l->first = NULL;
-                                }
-                                ll = l;
-                                l = l->next;
-                                nasm_free(ll);
-                            }
-                            expansions = ed->prev;
-                            nasm_free(ed);
-                            */
+                        } else if (ed->type != EXP_MMACRO) {
+                                                       expansions = ed->prev;
+                                                       free_expdef(ed);
                         }
                         if ((ei->type == EXP_REP) ||
                             (ei->type == EXP_MMACRO) ||