I have problem with my program writed in c++, using libsoup and queue.
void operator()()
{
ELEMENT e;
while(1)
{
if(!fq->empty())
{
mutex.lock();
e = fq->front();
run(server, &e);
fq->pop();
mutex.unlock();
}
It works good before I add ExecuteLoop to make an queue. When I run it and start to make requests to the server I see memory vialation error. From time to time it gives me more information:
*** glibc detected *** ./fifo: double free or corruption (!prev):
0x0a23e758 ***
======= Backtrace: =========
(...)
I have no idea where I make a mistake. Can you help me?