-
Notifications
You must be signed in to change notification settings - Fork 88
Description
This is a follow up of the issue godror/godror#382.
Me and another user have noticed a memory leak when dequeuing more than one message at a time.
The cause seems to be related to allocating more messages than the ones that are then actually dequeued.
I'll place here the relevant comment from Godror's maintainer:
Strange. If I interpret this correctly, then it means that iff we deque with the proper size (as many as there's waiting), then there' no leak. Otherwise, it leaks.
dpiDeq__deq in odpi/src/dpiQueue.c buffers payload, indicator, message id arrays.
But I see a possible glitch: it allocates and initializes the given number of dpiMsgProps,
but never frees extras if less than the given number of messages have been dequed.
This should not be a problem, as this allocates only once, and reuses the allocated dpiMsgProps.
Could you please have a look into this?
Thank you!
- What version of ODPI-C are you using (see dpi.h)? v5.6.2