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

Unified Diff: printing/backend/print_backend_cups.cc

Issue 19714003: Annotate a GnuTLS memory leak in printing/backend/print_backend_cups.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/backend/print_backend_cups.cc
diff --git a/printing/backend/print_backend_cups.cc b/printing/backend/print_backend_cups.cc
index e13cac9967fa3967f7cdbe5dd07b1ebf29471493..44c38bb96c337ca0bc7a88d0f88a2f487bceb91f 100644
--- a/printing/backend/print_backend_cups.cc
+++ b/printing/backend/print_backend_cups.cc
@@ -16,6 +16,7 @@
#include <gcrypt.h>
#endif
+#include "base/debug/leak_annotations.h"
#include "base/file_util.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
@@ -80,8 +81,14 @@ class GcryptInitializer {
<< " in " << kGnuTlsFiles[i];
continue;
}
- if ((*pgnutls_global_init)() != 0)
- LOG(ERROR) << "gnutls_global_init() failed";
+ {
+ // GnuTLS has a genuine small memory leak that is easier to annotate
+ // than suppress. See http://crbug.com/176888#c7
+ // TODO(earthdok): remove this once the leak is fixed.
+ ANNOTATE_SCOPED_MEMORY_LEAK;
+ if ((*pgnutls_global_init)() != 0)
+ LOG(ERROR) << "gnutls_global_init() failed";
+ }
return;
}
LOG(ERROR) << "Cannot find libgnutls";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698