Re: [PATCH] Fix crash on dereferencing dangling pointers

2014-05-08 Thread Tomaz Canabrava
Em 08/05/2014 01:52, Thiago Macieira thi...@macieira.org escreveu: QList::first() returns a reference to an item, but that list was a temporary. The list gets destroyed at the end of the statement (the semi-colon), so we ended up keeping a reference to freed data (i.e., a dangling pointer0 I

Re: [PATCH] Fix crash on dereferencing dangling pointers

2014-05-08 Thread Thiago Macieira
Em qui 08 maio 2014, às 07:32:59, Tomaz Canabrava escreveu: Em 08/05/2014 01:52, Thiago Macieira thi...@macieira.org escreveu: QList::first() returns a reference to an item, but that list was a temporary. The list gets destroyed at the end of the statement (the semi-colon), so we ended up

[PATCH] Fix crash on dereferencing dangling pointers

2014-05-07 Thread Thiago Macieira
QList::first() returns a reference to an item, but that list was a temporary. The list gets destroyed at the end of the statement (the semi-colon), so we ended up keeping a reference to freed data (i.e., a dangling pointer0 Signed-off-by: Thiago Macieira thi...@macieira.org ---