[libvirt] [PATCH] use virBitmapFree instead of VIR_FREE for cpumask

2013-06-03 Thread Ján Tomko
Found by 'git grep FREE.*cpumask' after looking at 31f1f6b.
---
 src/conf/domain_conf.c   | 2 +-
 src/libxl/libxl_driver.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 46d49a2..b335b58 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -13542,7 +13542,7 @@ virDomainVcpuPinDel(virDomainDefPtr def, int vcpu)
 
 for (n = 0; n < def->cputune.nvcpupin; n++) {
 if (vcpupin_list[n]->vcpuid == vcpu) {
-VIR_FREE(vcpupin_list[n]->cpumask);
+virBitmapFree(vcpupin_list[n]->cpumask);
 VIR_FREE(vcpupin_list[n]);
 memmove(&vcpupin_list[n],
 &vcpupin_list[n+1],
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 7245f97..bed583b 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -651,7 +651,7 @@ libxlVmCleanup(libxlDriverPrivatePtr driver,
 /* Remove any cputune settings */
 if (vm->def->cputune.nvcpupin) {
 for (i = 0; i < vm->def->cputune.nvcpupin; ++i) {
-VIR_FREE(vm->def->cputune.vcpupin[i]->cpumask);
+virBitmapFree(vm->def->cputune.vcpupin[i]->cpumask);
 VIR_FREE(vm->def->cputune.vcpupin[i]);
 }
 VIR_FREE(vm->def->cputune.vcpupin);
-- 
1.8.1.5

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


Re: [libvirt] [PATCH] use virBitmapFree instead of VIR_FREE for cpumask

2013-06-03 Thread Guannan Ren

On 06/03/2013 07:11 PM, Ján Tomko wrote:

Found by 'git grep FREE.*cpumask' after looking at 31f1f6b.
---
  src/conf/domain_conf.c   | 2 +-
  src/libxl/libxl_driver.c | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 46d49a2..b335b58 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -13542,7 +13542,7 @@ virDomainVcpuPinDel(virDomainDefPtr def, int vcpu)
  
  for (n = 0; n < def->cputune.nvcpupin; n++) {

  if (vcpupin_list[n]->vcpuid == vcpu) {
-VIR_FREE(vcpupin_list[n]->cpumask);
+virBitmapFree(vcpupin_list[n]->cpumask);
  VIR_FREE(vcpupin_list[n]);
  memmove(&vcpupin_list[n],
  &vcpupin_list[n+1],
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 7245f97..bed583b 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -651,7 +651,7 @@ libxlVmCleanup(libxlDriverPrivatePtr driver,
  /* Remove any cputune settings */
  if (vm->def->cputune.nvcpupin) {
  for (i = 0; i < vm->def->cputune.nvcpupin; ++i) {
-VIR_FREE(vm->def->cputune.vcpupin[i]->cpumask);
+virBitmapFree(vm->def->cputune.vcpupin[i]->cpumask);
  VIR_FREE(vm->def->cputune.vcpupin[i]);
  }
  VIR_FREE(vm->def->cputune.vcpupin);


   ACK

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


Re: [libvirt] [PATCH] use virBitmapFree instead of VIR_FREE for cpumask

2013-06-03 Thread Ján Tomko
On 06/03/2013 02:00 PM, Guannan Ren wrote:
> On 06/03/2013 07:11 PM, Ján Tomko wrote:
>> Found by 'git grep FREE.*cpumask' after looking at 31f1f6b.
>> ---
>>   src/conf/domain_conf.c   | 2 +-
>>   src/libxl/libxl_driver.c | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>> index 46d49a2..b335b58 100644
>> --- a/src/conf/domain_conf.c
>> +++ b/src/conf/domain_conf.c
>> @@ -13542,7 +13542,7 @@ virDomainVcpuPinDel(virDomainDefPtr def, int vcpu)
>> for (n = 0; n < def->cputune.nvcpupin; n++) {
>>   if (vcpupin_list[n]->vcpuid == vcpu) {
>> -VIR_FREE(vcpupin_list[n]->cpumask);
>> +virBitmapFree(vcpupin_list[n]->cpumask);
>>   VIR_FREE(vcpupin_list[n]);
>>   memmove(&vcpupin_list[n],
>>   &vcpupin_list[n+1],
>> diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
>> index 7245f97..bed583b 100644
>> --- a/src/libxl/libxl_driver.c
>> +++ b/src/libxl/libxl_driver.c
>> @@ -651,7 +651,7 @@ libxlVmCleanup(libxlDriverPrivatePtr driver,
>>   /* Remove any cputune settings */
>>   if (vm->def->cputune.nvcpupin) {
>>   for (i = 0; i < vm->def->cputune.nvcpupin; ++i) {
>> -VIR_FREE(vm->def->cputune.vcpupin[i]->cpumask);
>> +virBitmapFree(vm->def->cputune.vcpupin[i]->cpumask);
>>   VIR_FREE(vm->def->cputune.vcpupin[i]);
>>   }
>>   VIR_FREE(vm->def->cputune.vcpupin);
> 
>ACK
> 

Thanks, pushed now.

Jan

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


Re: [libvirt] [PATCH] use virBitmapFree instead of VIR_FREE for cpumask

2013-06-03 Thread Eric Blake
On 06/03/2013 05:11 AM, Ján Tomko wrote:
> Found by 'git grep FREE.*cpumask' after looking at 31f1f6b.
> ---
>  src/conf/domain_conf.c   | 2 +-
>  src/libxl/libxl_driver.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

ACK.

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list