aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/lib/io
diff options
context:
space:
mode:
authorGravatar Dandelion Man? <dandelion@google.com>2017-12-15 17:12:41 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-12-15 17:16:29 -0800
commitd55f532867a3670d66460c5ee3b774519542adc1 (patch)
tree7de4d85bcd61e93401459276b4d371ab0be23c1f /tensorflow/core/lib/io
parent32d5048ae96116202f2aa0fa739ef37514ee8a54 (diff)
Merge changes from github.
PiperOrigin-RevId: 179258973
Diffstat (limited to 'tensorflow/core/lib/io')
-rw-r--r--tensorflow/core/lib/io/snappy/snappy_outputbuffer.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/tensorflow/core/lib/io/snappy/snappy_outputbuffer.cc b/tensorflow/core/lib/io/snappy/snappy_outputbuffer.cc
index be1fa22c69..3c31016732 100644
--- a/tensorflow/core/lib/io/snappy/snappy_outputbuffer.cc
+++ b/tensorflow/core/lib/io/snappy/snappy_outputbuffer.cc
@@ -161,7 +161,7 @@ Status SnappyOutputBuffer::Deflate() {
}
// Write length of compressed block to output buffer.
- char* compressed_length_array = new char[4];
+ char compressed_length_array[4];
std::fill(compressed_length_array, compressed_length_array + 4, 0);
for (int i = 0; i < 4; i++) {
// Little endian.
@@ -173,7 +173,6 @@ Status SnappyOutputBuffer::Deflate() {
TF_RETURN_IF_ERROR(AddToOutputBuffer(output.data(), output.size()));
next_in_ += avail_in_;
avail_in_ = 0;
- delete[] compressed_length_array;
return Status::OK();
}