Fix memory leaks in ProtobufDecoder
Issue: SPR-17418
This commit is contained in:
@@ -216,12 +216,18 @@ public class ProtobufDecoder extends ProtobufCodecSupport implements Decoder<Mes
|
||||
} while (remainingBytesToRead > 0);
|
||||
return messages;
|
||||
}
|
||||
catch (DecodingException ex) {
|
||||
throw ex;
|
||||
}
|
||||
catch (IOException ex) {
|
||||
throw new DecodingException("I/O error while parsing input stream", ex);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
throw new DecodingException("Could not read Protobuf message: " + ex.getMessage(), ex);
|
||||
}
|
||||
finally {
|
||||
DataBufferUtils.release(input);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user