mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Fix memory leaks (coverity issues 1365586 & 1365591)
Reviewers: hfinkel Subscribers: george.burgess.iv, malcolm.parsons, boris.ulasevich, llvm-commits Differential Revision: https://reviews.llvm.org/D26347 llvm-svn: 286223
This commit is contained in:
parent
770cc418cd
commit
5e01f87d4a
@ -1686,8 +1686,10 @@ IEEEFloat::opStatus IEEEFloat::remainder(const IEEEFloat &rhs) {
|
||||
bool ignored;
|
||||
fs = V.convertToInteger(x, parts * integerPartWidth, true,
|
||||
rmNearestTiesToEven, &ignored);
|
||||
if (fs==opInvalidOp)
|
||||
if (fs==opInvalidOp) {
|
||||
delete[] x;
|
||||
return fs;
|
||||
}
|
||||
|
||||
fs = V.convertFromZeroExtendedInteger(x, parts * integerPartWidth, true,
|
||||
rmNearestTiesToEven);
|
||||
@ -1724,8 +1726,10 @@ IEEEFloat::opStatus IEEEFloat::mod(const IEEEFloat &rhs) {
|
||||
bool ignored;
|
||||
fs = V.convertToInteger(x, parts * integerPartWidth, true,
|
||||
rmTowardZero, &ignored);
|
||||
if (fs==opInvalidOp)
|
||||
if (fs==opInvalidOp) {
|
||||
delete[] x;
|
||||
return fs;
|
||||
}
|
||||
|
||||
fs = V.convertFromZeroExtendedInteger(x, parts * integerPartWidth, true,
|
||||
rmNearestTiesToEven);
|
||||
|
Loading…
x
Reference in New Issue
Block a user