[1/2] newlib/doc/makedoc.c: Fix memory leak identified by Coverity.

Message ID 20210617215330.24276-1-joel@rtems.org
State New
Headers show
Series
  • [1/2] newlib/doc/makedoc.c: Fix memory leak identified by Coverity.
Related show

Commit Message

Joel Sherrill June 17, 2021, 9:53 p.m.
---
 newlib/doc/makedoc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.24.4

Patch

diff --git a/newlib/doc/makedoc.c b/newlib/doc/makedoc.c
index 36a14e535..966349c51 100644
--- a/newlib/doc/makedoc.c
+++ b/newlib/doc/makedoc.c
@@ -1278,7 +1278,8 @@  compile (char *string)
 	}	    
     }
 
-return(ret);
+    free(word);
+    return(ret);
 }