Silence a static analyzer warning
Our static analyzer is unhappy with this code, and thinks it has a memory leak: device/generic/opengl-transport/host/libs/virglrenderer/AVDVirglRenderer.cpp:343:38: warning: Potential leak of memory pointed to by 'config' [clang-analyzer-cplusplus.NewDeleteLeaks] While this immediately seems true, the constructor for `config` will stash a pointer to `config` in a static vector, which presumably is meant to manage the lifetime of our newly-allocated `config`. As noted in the comments, the analyzer can generally reason about that, but it gives up trying to figure out what the constructor is doing before we reach the vector's push_back. Just put a NOLINT here to make it be quiet. Bug: None Test: Ran the analyzer. It's no longer angry. Change-Id: Ida0118ef8b9ca0cd40cdd5e76489ab14cb86ea23
Loading
Please register or sign in to comment