Snap for 4605948 from 3d4929c16ca1d0cf868cf6c736b7d900f66447c0 to pi-release
Change-Id: I5fcf6df19c8053d48230675c3a476c69eaee0164
diff --git a/brotli_compressor_unittest.cc b/brotli_compressor_unittest.cc
index f75ac2c..cfa66f6 100644
--- a/brotli_compressor_unittest.cc
+++ b/brotli_compressor_unittest.cc
@@ -52,4 +52,4 @@
EXPECT_TRUE(brotli_decompressor.Close());
}
-} // namespace bsdiff
\ No newline at end of file
+} // namespace bsdiff
diff --git a/brotli_decompressor.cc b/brotli_decompressor.cc
index 20a1b14..1bc7722 100644
--- a/brotli_decompressor.cc
+++ b/brotli_decompressor.cc
@@ -59,4 +59,4 @@
return true;
}
-} // namespace bsdiff
\ No newline at end of file
+} // namespace bsdiff
diff --git a/brotli_decompressor.h b/brotli_decompressor.h
index ccfcb2d..0c63d8f 100644
--- a/brotli_decompressor.h
+++ b/brotli_decompressor.h
@@ -29,4 +29,4 @@
} // namespace bsdiff
-#endif // _BSDIFF_BROTLI_DECOMPRESSOR_H_
\ No newline at end of file
+#endif // _BSDIFF_BROTLI_DECOMPRESSOR_H_
diff --git a/bsdiff_main.cc b/bsdiff_main.cc
index 1465441..6747055 100644
--- a/bsdiff_main.cc
+++ b/bsdiff_main.cc
@@ -85,8 +85,13 @@
return 1;
}
- return bsdiff::bsdiff(old_buf, oldsize, new_buf, newsize,
- arguments.min_length(), patch_writer.get(), nullptr);
+ int ret = bsdiff::bsdiff(old_buf, oldsize, new_buf, newsize,
+ arguments.min_length(), patch_writer.get(), nullptr);
+
+ munmap(old_buf, oldsize);
+ munmap(new_buf, newsize);
+
+ return ret;
}
void PrintUsage(const std::string& proc_name) {
diff --git a/bz2_decompressor.cc b/bz2_decompressor.cc
index 2fc6512..1a3636e 100644
--- a/bz2_decompressor.cc
+++ b/bz2_decompressor.cc
@@ -60,4 +60,4 @@
return true;
}
-} // namespace bsdiff
\ No newline at end of file
+} // namespace bsdiff
diff --git a/bz2_decompressor.h b/bz2_decompressor.h
index 4b698ce..9b2acdc 100644
--- a/bz2_decompressor.h
+++ b/bz2_decompressor.h
@@ -27,4 +27,4 @@
} // namespace bsdiff
-#endif
\ No newline at end of file
+#endif
diff --git a/decompressor_interface.cc b/decompressor_interface.cc
index 31cbd47..d8ebb57 100644
--- a/decompressor_interface.cc
+++ b/decompressor_interface.cc
@@ -23,4 +23,4 @@
}
}
-} // namespace bsdiff
\ No newline at end of file
+} // namespace bsdiff
diff --git a/include/bsdiff/constants.h b/include/bsdiff/constants.h
index 5236637..860d015 100644
--- a/include/bsdiff/constants.h
+++ b/include/bsdiff/constants.h
@@ -24,4 +24,4 @@
} // namespace bsdiff
-#endif // _BSDIFF_CONSTANTS_H_
\ No newline at end of file
+#endif // _BSDIFF_CONSTANTS_H_