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

Unified Diff: printing/backend/print_backend_cups.cc

Issue 10908022: Valgrind: Fix some leaks in the CUPS printing code and remove a no longer supported OS X 10.5 check. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
« 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
===================================================================
--- printing/backend/print_backend_cups.cc (revision 155424)
+++ printing/backend/print_backend_cups.cc (working copy)
@@ -26,10 +26,7 @@
#include "printing/backend/cups_helper.h"
#include "printing/backend/print_backend_consts.h"
-#if (defined(OS_MACOSX) && \
- MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5) || \
- (defined(OS_LINUX) && \
- CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 4)
+#if (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 4)
const int CUPS_PRINTER_SCANNER = 0x2000000; // Scanner-only device
#endif
@@ -210,7 +207,9 @@
cups_dest_t* dests;
int num_dests = GetDests(&dests);
cups_dest_t* dest = cupsGetDest(NULL, NULL, num_dests, dests);
- return dest ? std::string(dest->name) : std::string();
+ std::string name = dest ? std::string(dest->name) : std::string();
+ cupsFreeDests(num_dests, dests);
+ return name;
}
bool PrintBackendCUPS::GetPrinterSemanticCapsAndDefaults(
« 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