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

Re: [Libvir] Remove useless "if (foo)" before "free (foo)".



Jim Meyering <jim meyering net> wrote:
> "Daniel P. Berrange" <berrange redhat com> wrote:
>> I gave it a once-over and it looks correct to me.
>
> Thanks for the quick review.

In relaxing the regexp, I found two more:

diff --git a/src/xm_internal.c b/src/xm_internal.c
index a1317c4..90dc1a4 100644
--- a/src/xm_internal.c
+++ b/src/xm_internal.c
@@ -1307,10 +1307,8 @@ int xenXMDomainPinVcpu(virDomainPtr domain,
     ret = 0;

  cleanup:
-    if(mapstr)
-        free(mapstr);
-    if(ranges)
-        free(ranges);
+    free(mapstr);
+    free(ranges);
     return (ret);
 }


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