Avoid race condition around libparted device use.

FIXES #782
This commit is contained in:
Adriaan de Groot 2017-08-31 05:28:58 -04:00
parent 798640be0d
commit b22bd67a5f

View File

@ -126,7 +126,15 @@ check_big_enough(long long required_space)
break;
}
}
ped_device_free_all();
// We would free the devices to release allocated memory,
// but other modules might be using partman use well,
// and they can hold pointers to libparted structures in
// other threads.
//
// So prefer to leak memory, instead.
//
// ped_device_free_all();
return big_enough;
}