Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1941)

Unified Diff: native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc

Issue 605433003: [NaCl SDK] nacl_io: Fix gaping memory leaks in memfs and htmlfs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_nacl_io
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc b/native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc
index 963b5d138d9eecfd990deb1ff4000f042050c7c3..deee45ba63be6e0c2c049561619fdbc2ec43dd9e 100644
--- a/native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc
+++ b/native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc
@@ -221,6 +221,10 @@ HttpFsNode::HttpFsNode(Filesystem* filesystem,
SetMode(S_IRALL);
}
+HttpFsNode::~HttpFsNode() {
+ free(buffer_);
+}
+
Error HttpFsNode::GetStat_Locked(struct stat* stat) {
// Assume we need to 'HEAD' if we do not know the size, otherwise, assume
// that the information is constant. We can add a timeout if needed.

Powered by Google App Engine
This is Rietveld 408576698