Message-Id: <3.0.1.32.19980107154650.007e5190@yacker.xiotech.com> Date: Wed, 07 Jan 1998 15:46:50 -0600 To: djgpp-workers AT delorie DOT com From: Randy Maas Subject: patch for fsext.c Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_884231210==_" Precedence: bulk --=====================_884231210==_ Content-Type: text/plain; charset="us-ascii" [This seems to have bounce'd... if anyone gets duplicates, I apologize] This just cleans up a little of the exit routine -- there is a guard to prevent it from being recursively called by exit (if something calls exit again), and it frees the table it has allocated for internal purposes. Randy --=====================_884231210==_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: attachment; filename="fsext.dif" *** /local/src/libc/fsext/fsext.c~1 Fri Jan 2 00:29:06 1998 --- /local/src/libc/fsext/fsext.c Wed Jan 7 13:19:08 1998 *************** *** 119,125 **** --- 119,130 ---- if (!fsext_list) return; + __FSEXT_exit_hook=NULL; for (i = 0; i < num_fds; i++) if (fsext_list[i].function) close(i); + + /* Free the table */ + free(fsext_list); + fsext_list = NULL; } --=====================_884231210==_ Content-Type: text/plain; charset="us-ascii" --=====================_884231210==_--