• L
    network: eliminate potential memory leak on parse failure · 4a6ffae3
    Laine Stump 提交于
    While the first encountered dns host record is being parsed, it's
    possible for virNetworkDef::hosts to point to memory that has been
    allocated, but virNetworkDef::nhosts to still be 0. If there is a
    failure during that time, virNetworkDef::hosts will be leaked.
    
    Although this isn't currently the case for virNetworkDef::txtrecords,
    it could become that way through future re-factoring, and it hurts
    nothing to restructure the freeing of txtrecord data to match that of
    hosts data.
    4a6ffae3
network_conf.c 52.0 KB