From ac088aeced8b7cbe08efcc910fea91f745e7f353 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Fri, 7 Jun 2002 09:30:37 +0000 Subject: [PATCH] Fixed thread_list re-allocation SVN revision: 77 --- elconv.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/elconv.c b/elconv.c index 3b2cd0cd..5ebe1dfe 100644 --- a/elconv.c +++ b/elconv.c @@ -6,6 +6,9 @@ Contents: Conversion program for ELOG messages $Log$ + Revision 1.3 2002/06/07 09:30:37 midas + Fixed thread_list re-allocation + Revision 1.2 2002/06/03 12:37:54 midas Added thread evaluation @@ -1030,6 +1033,7 @@ THREAD *thread_list; message_id++; strcat(tag, "+1"); + thread_list = realloc(thread_list, sizeof(THREAD)*message_id); } while (1); @@ -1062,6 +1066,7 @@ THREAD *thread_list; if (fh < 0) { printf("Error: Cannot open file %s for writing.\n", file_name); + free(thread_list); return; } @@ -1115,6 +1120,7 @@ THREAD *thread_list; } while (1); + free(thread_list); } /*------------------------------------------------------------------*/