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

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



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


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