On Sat, Apr 22, 2017 at 07:30:05AM -0400, John Ferlan wrote:
On 04/20/2017 08:21 AM, Martin Kletzander wrote:We are currently parsing only rx_max_coalesced_frames because that's the only value that makes sense for us. The tun device just added support for this one and the others are only supported by hardware devices which we don't need to worry about as the only way we'd pass those to the domain is using <hostdev/> or <interface type='hostdev'/>. And in those cases the guest can modify the settings itself. Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> --- docs/formatdomain.html.in | 24 ++++ docs/schemas/domaincommon.rng | 131 +++++++++++++++++++++ src/conf/domain_conf.c | 80 +++++++++++++ src/conf/domain_conf.h | 2 + src/qemu/qemu_domain.c | 31 +++++ .../qemuxml2argvdata/qemuxml2argv-net-coalesce.xml | 68 +++++++++++ .../qemuxml2xmlout-net-coalesce.xml | 71 +++++++++++ tests/qemuxml2xmltest.c | 1 + 8 files changed, 408 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-coalesce.xml create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-net-coalesce.xmlCoverity found a resource leak...diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 705deb39a1bf..cbeebdc56880 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6772,6 +6772,77 @@ virDomainNetIPInfoParseXML(const char *source, return ret; } + +static virNetDevCoalescePtr +virDomainNetDefCoalesceParseXML(xmlNodePtr node, + xmlXPathContextPtr ctxt) +{ + virNetDevCoalescePtr ret = NULL; + xmlNodePtr save = NULL; + char *str = NULL; + unsigned long long tmp = 0; + + save = ctxt->node; + ctxt->node = node; + + str = virXPathString("string(./rx/frames/@max)", ctxt); + if (!str) + goto cleanup; + + if (!ret && VIR_ALLOC(ret) < 0) + goto cleanup;Right here - str isn't free'd in cleanup (or error), but could be...
Well, the code is pushed already, but I'll push a trivial patch in a minute. Thanks for noticing.
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list