
Pair of C++ new/delete and malloc/free (and other C's variations of memory allocations) shouldn't be mixed to ensure correct memory allocation/deallocation. Thus, use cupsAddOption instead, which uses same memory allocation semantics as cupsFreeOptions. Also rewrote the tests as the address of the name value of the CUPS option was returned, cups options were destroyed, and heap use after free occurred. Bug: 1362988 Change-Id: I32d815b2adedee5db267d3b0ad42700caf5da608 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3890984 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Maksim Sisov <msisov@igalia.com> Cr-Commit-Position: refs/heads/main@{#1046775}
//printing
contains foundational code that is used for printing. It can depend
on other low-level directories like //cc/paint
and //ui
, but not higher
level code like //components
or //content
. Higher level printing code should
live in //components/printing
or the embedder.