Re: [libvirt] [PATCH] conf: fix use after free in virChrdevOpen

2013-05-23 Thread Ján Tomko
On 05/22/2013 04:44 PM, Eric Blake wrote: On 05/22/2013 05:37 AM, Ján Tomko wrote: Don't free the stream on error if we've successfully added it to the hash table, since it will be freed by virChrdevHashEntryFree callback. Preserve the error message before calling virStreamFree, since it

[libvirt] [PATCH] conf: fix use after free in virChrdevOpen

2013-05-22 Thread Ján Tomko
Don't free the stream on error if we've successfully added it to the hash table, since it will be freed by virChrdevHashEntryFree callback. Preserve the error message before calling virStreamFree, since it resets the error. Reported by Sergey Fionov on libvir-list. --- src/conf/virchrdev.c | 15

Re: [libvirt] [PATCH] conf: fix use after free in virChrdevOpen

2013-05-22 Thread Eric Blake
On 05/22/2013 05:37 AM, Ján Tomko wrote: Don't free the stream on error if we've successfully added it to the hash table, since it will be freed by virChrdevHashEntryFree callback. Preserve the error message before calling virStreamFree, since it resets the error. Reported by Sergey