]> xenbits.xensource.com Git - libvirt.git/commit
Coverity: Fix resource leak in nodeinfo.c
authorOsier Yang <jyang@redhat.com>
Wed, 2 May 2012 15:18:03 +0000 (23:18 +0800)
committerOsier Yang <jyang@redhat.com>
Fri, 4 May 2012 02:27:39 +0000 (10:27 +0800)
commit739cfc31619e9ba8ee450e8762261285093f1f47
tree06aba6254659058a5ff36726cfbc057de44b506a
parentad4d4ad036c80806afbfa108fb2d47bb73497d31
Coverity: Fix resource leak in nodeinfo.c

Error: RESOURCE_LEAK:
/builddir/build/BUILD/libvirt-0.9.10/src/nodeinfo.c:629: alloc_fn: Calling allocation function "fopen".
/builddir/build/BUILD/libvirt-0.9.10/src/nodeinfo.c:629: var_assign: Assigning: "cpuinfo" =  storage returned from "fopen("/proc/cpuinfo", "r")".
/builddir/build/BUILD/libvirt-0.9.10/src/nodeinfo.c:638: leaked_storage: Variable "cpuinfo" going out of scope leaks the storage it points to.
src/nodeinfo.c