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

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

 



Jim Meyering <jim@xxxxxxxxxxxx> wrote:
> "Daniel P. Berrange" <berrange@xxxxxxxxxx> 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);
 }

--
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]