From b2edcbe1b9c9d161e96cb56d0efd944e84d84526 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 23 Aug 2011 19:19:13 +0100 Subject: [PATCH] Coverity: in daemon, free struct in RStruct, RStructList functions. --- generator/generator_daemon.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generator/generator_daemon.ml b/generator/generator_daemon.ml index 7e18e35..7537716 100644 --- a/generator/generator_daemon.ml +++ b/generator/generator_daemon.ml @@ -289,6 +289,7 @@ and generate_daemon_actions () = | RStruct (n, _) -> pr " struct guestfs_%s_ret ret;\n" name; pr " ret.%s = *r;\n" n; + pr " free (r);\n"; pr " reply ((xdrproc_t) xdr_guestfs_%s_ret, (char *) &ret);\n" name; pr " xdr_free ((xdrproc_t) xdr_guestfs_%s_ret, (char *) &ret);\n" @@ -296,6 +297,7 @@ and generate_daemon_actions () = | RStructList (n, _) -> pr " struct guestfs_%s_ret ret;\n" name; pr " ret.%s = *r;\n" n; + pr " free (r);\n"; pr " reply ((xdrproc_t) xdr_guestfs_%s_ret, (char *) &ret);\n" name; pr " xdr_free ((xdrproc_t) xdr_guestfs_%s_ret, (char *) &ret);\n" -- 1.8.3.1