diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-08-23 19:19:13 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-08-23 19:19:13 +0100 |
commit | b2edcbe1b9c9d161e96cb56d0efd944e84d84526 (patch) | |
tree | 095e284a045449544b87cede7b9075a041a14964 /generator | |
parent | 631faad97171d7c1238b2e413c663cf61476f440 (diff) | |
download | libguestfs-b2edcbe1b9c9d161e96cb56d0efd944e84d84526.tar.gz libguestfs-b2edcbe1b9c9d161e96cb56d0efd944e84d84526.tar.xz libguestfs-b2edcbe1b9c9d161e96cb56d0efd944e84d84526.zip |
Coverity: in daemon, free struct in RStruct, RStructList functions.
Diffstat (limited to 'generator')
-rw-r--r-- | generator/generator_daemon.ml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/generator/generator_daemon.ml b/generator/generator_daemon.ml index 7e18e35a..75377169 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" |