Skip to content
Snippets Groups Projects
Commit d2b525e7 authored by George Burgess IV's avatar George Burgess IV
Browse files

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
parent c0cd03e8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment