diff options
author | korbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-05-07 11:09:31 +0000 |
---|---|---|
committer | korbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-05-07 11:09:31 +0000 |
commit | 862bc769cbfe3d441510bb78796e2ffb38abfe4d (patch) | |
tree | 82faa2640a545bb5015b16e379b4f2f7dba0752b | |
parent | 1bf0277d0500cbf878520322df7a362b492eb4a0 (diff) | |
download | gcc-862bc769cbfe3d441510bb78796e2ffb38abfe4d.tar.gz |
fix memory leak in run_compiles
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26822 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 1 | ||||
-rw-r--r-- | gcc/fixinc/fixincl.c | 17 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index edc1e721d2b..27aa6555669 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -16,6 +16,7 @@ Fri May 7 14:19:31 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> (sig_handler): Add debug code. * fixinc/server.c (run_shell): Don't \-escape cd, it breaks the Ultrix V4.3 /bin/sh. + * fixinc/fixincl.c (run_compiles): fix memory leak Thu May 6 20:34:00 1999 Mark Mitchell <mark@codesourcery.com> diff --git a/gcc/fixinc/fixincl.c b/gcc/fixinc/fixincl.c index bad82b86d8d..0b1fcb2b379 100644 --- a/gcc/fixinc/fixincl.c +++ b/gcc/fixinc/fixincl.c @@ -634,12 +634,17 @@ run_compiles () /* Run the script. The result will start either with 's' or 'r'. */ - pz = run_shell (file_name_buf); - if (*pz == 's') - { - p_fixd->fd_flags |= FD_SKIP_TEST; - continue; - } + { + int skip; + pz = run_shell (file_name_buf); + skip = (*pz == 's'); + free ( (void*)pz ); + if (skip) + { + p_fixd->fd_flags |= FD_SKIP_TEST; + continue; + } + } } /* FOR every test for the fixup, ... */ |