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
7783ea6a61
commit
3ce346d4ca
|
@ -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…
Reference in New Issue