]> xenbits.xensource.com Git - libvirt.git/commitdiff
virnetdev: Resolve Coverity RESOURCE_LEAK
authorJohn Ferlan <jferlan@redhat.com>
Wed, 29 Oct 2014 22:29:43 +0000 (18:29 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 29 Oct 2014 22:56:06 +0000 (18:56 -0400)
virFileReadAll returns a chunk of memory that needs to be free'd when
done

src/util/virnetdev.c

index 4fea4cb4ef30954d16ec549a77cdb35bb5573a02..0c9c1f907df02ad8117adf9c0db606c6149b697f 100644 (file)
@@ -2200,6 +2200,7 @@ static int virNetDevGetMcastList(const char *ifname,
 
     ret = 0;
  cleanup:
+    VIR_FREE(buf);
     VIR_FREE(entry);
 
     return ret;