codec/rfx: Silence BAD_FREE reported by Coverity

The `rfx_context_free` function uses the `rfx_message_free` function
with an address of the statically allocated `RFX_MESSAGE` struct. This
causes that the following is reported from covscan:

```
address_free: "rfx_message_free" frees address of "context->currentMessage".
```

I am convinced that this is just false-positive as the address is freed
only when `freeArray` is `0`, which is not in case of `RFX_CONTEXT`.
Let's add a code annotation to silence the false-positive next time.
This commit is contained in:
Ondrej Holy 2021-04-16 10:58:35 +02:00 committed by akallabeth
parent 637413daf4
commit ac25baa5ee

View File

@ -369,6 +369,7 @@ void rfx_context_free(RFX_CONTEXT* context)
assert(NULL != context->priv->TilePool); assert(NULL != context->priv->TilePool);
assert(NULL != context->priv->BufferPool); assert(NULL != context->priv->BufferPool);
priv = context->priv; priv = context->priv;
/* coverity[address_free] */
rfx_message_free(context, &context->currentMessage); rfx_message_free(context, &context->currentMessage);
free(context->quants); free(context->quants);
ObjectPool_Free(priv->TilePool); ObjectPool_Free(priv->TilePool);