From: Richard W.M. Jones Date: Tue, 23 Aug 2011 18:19:13 +0000 (+0100) Subject: Coverity: in daemon, free struct in RStruct, RStructList functions. X-Git-Tag: 1.13.7~5 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=b2edcbe1b9c9d161e96cb56d0efd944e84d84526;p=libguestfs.git Coverity: in daemon, free struct in RStruct, RStructList functions. --- 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"