From 84bb886e4cfa6a74a9fe5081a91461ef0a19d0ab Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Mon, 4 Jul 2011 18:10:30 -0400 Subject: [PATCH] Fix error handling in explain. On a memory allocation failure, we leak the decl allocated by the parser. Fix that up. --- src/cdecl99.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cdecl99.c b/src/cdecl99.c index a077191..28bd23b 100644 --- a/src/cdecl99.c +++ b/src/cdecl99.c @@ -54,7 +54,7 @@ retry: tmp = realloc(buf, rc + 1); if (!tmp) { fprintf(stderr, "failed to allocate memory\n"); - return 1; + goto out; } buf = tmp; -- 2.43.2