Re: [PATCH 3/3] virNetMessageSaveError: Fix copy and paste error

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

 



On 23/05/13 22:05, Michal Privoznik wrote:
Previously, we were freeing verr fields instead of rerr which we've
allocated just a line above.
---
  src/rpc/virnetmessage.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/rpc/virnetmessage.c b/src/rpc/virnetmessage.c
index 4c6703d..f27a236 100644
--- a/src/rpc/virnetmessage.c
+++ b/src/rpc/virnetmessage.c
@@ -521,13 +521,13 @@ void virNetMessageSaveError(virNetMessageErrorPtr rerr)
          rerr->level = verr->level;
          if (verr->str1 && VIR_ALLOC(rerr->str1) == 0 &&
              VIR_STRDUP_QUIET(*rerr->str1, verr->str1) < 0)
-            VIR_FREE(verr->str1);
+            VIR_FREE(rerr->str1);
          if (verr->str2 && VIR_ALLOC(rerr->str2) == 0 &&
              VIR_STRDUP_QUIET(*rerr->str2, verr->str2) < 0)
-            VIR_FREE(verr->str2);
+            VIR_FREE(rerr->str2);
          if (verr->str3 && VIR_ALLOC(rerr->str3) == 0 &&
              VIR_STRDUP_QUIET(*rerr->str3, verr->str3) < 0)
-            VIR_FREE(verr->str2);
+            VIR_FREE(rerr->str3);
          rerr->int1 = verr->int1;
          rerr->int2 = verr->int2;
      } else {
ACK

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]