diff --git a/cobc/codegen.c b/cobc/codegen.c index f4f7d232d..f75ff8db5 100644 --- a/cobc/codegen.c +++ b/cobc/codegen.c @@ -1847,7 +1847,7 @@ output_gnucobol_defines (const char *formatted_date) output_line ("#include \"%s\"", ld->text); } next = ld->next; - if (ld->next != NULL) + if (next != NULL) free (ld); ld = next; }