[lib] [misra/m] Do not free in vqueue_init

* defect: vqueue_init frees the memory allocated to the caller passed pointer
  on failure. However, caller passes a pointer to a static array location to
  vqueue_init. This is a MISRA violation where the rule states: "A block of
  memory shall only be freed if it was allocated by means of a
  Standard Library function" (e.g. malloc/realloc).

* fix: Do not free in vqueue_init and delegate the responsibility to the
  caller. In this case, caller executes vqueue_destroy when it detects failure.

MISRA Rigor Mandatory
MISRA Rule 22.2 - Dynamic Memory Management

Change-Id: Ib92a51e1c6b7b3e182f726c8293772497e7a3312
1 file changed
tree: ad2f4d770b946980c0ea77c13ccab615d990bf17
  1. app/
  2. include/
  3. lib/
  4. make/
  5. platform/
  6. target/
  7. AUTHORS
  8. LICENSE