diff options
author | Stuart Haslam <stuart.haslam@linaro.org> | 2015-03-16 13:58:01 +0000 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-03-17 13:13:16 +0300 |
commit | 6f88db2611ee9be6a8dcc80b0c446968e5342ecf (patch) | |
tree | ec4f9b64fe6641cd200731837234e2364664d633 /platform/linux-generic | |
parent | 678923038507d20e7509fdcffb33ab79ab055602 (diff) |
linux-generic: queue: fix potential queue leak
If schedule buffer allocation fails during odp_queue_create(), a
scheduled or pktin queue may be incorrectly left in an allocated
state.
Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic')
-rw-r--r-- | platform/linux-generic/odp_queue.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index 477b5e3b2..4bb8b9bc7 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -226,6 +226,7 @@ odp_queue_t odp_queue_create(const char *name, odp_queue_type_t type, buf = odp_schedule_buffer_alloc(handle); if (buf == ODP_BUFFER_INVALID) { + queue->s.status = QUEUE_STATUS_FREE; ODP_ERR("queue_init: sched buf alloc failed\n"); return ODP_QUEUE_INVALID; } |