From 1e60354dc8fb306fa139ae744a596f4f5bcbd9a7 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 16 Apr 2009 17:38:27 +0100 Subject: [PATCH] Missing free() on return path (thanks: Steve Grubb). --- daemon/stubs.c | 3 +++ src/generator.ml | 1 + 2 files changed, 4 insertions(+) diff --git a/daemon/stubs.c b/daemon/stubs.c index 2711000..dfadb83 100644 --- a/daemon/stubs.c +++ b/daemon/stubs.c @@ -2011,6 +2011,7 @@ parse_command_line_pvs (void) reply_with_error ("%s", err); free (out); free (err); + free (ret); return NULL; } @@ -2350,6 +2351,7 @@ parse_command_line_vgs (void) reply_with_error ("%s", err); free (out); free (err); + free (ret); return NULL; } @@ -2659,6 +2661,7 @@ parse_command_line_lvs (void) reply_with_error ("%s", err); free (out); free (err); + free (ret); return NULL; } diff --git a/src/generator.ml b/src/generator.ml index bd8afb7..41fc0c8 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -2394,6 +2394,7 @@ and generate_daemon_actions () = pr " reply_with_error (\"%%s\", err);\n"; pr " free (out);\n"; pr " free (err);\n"; + pr " free (ret);\n"; pr " return NULL;\n"; pr " }\n"; pr "\n"; -- 1.8.3.1