Google
  Web www.spinics.net

[PATCH] lxc: plug memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Alex Jia <ajia@xxxxxxxxxx>

Detected by Coverity. Leak introduced in commit 9d201a5.

* src/lxc/lxc_driver.c: Clean up on failure.

Signed-off-by: Alex Jia <ajia@xxxxxxxxxx>
---
 src/lxc/lxc_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 37092bc..295fd6f 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1856,7 +1856,7 @@ cleanup:
 
     if (err) {
         virSetError(err);
-        virResetError(err);
+        virFreeError(err);
     }
 
     return rc;
-- 
1.7.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

Powered by Linux

Google
  Web www.spinics.net