[libvirt] [v0.9.12-maint 09/11] conf: Remove callback from stream when freeing entries in console hash
Eric Blake
eblake at redhat.com
Wed Sep 11 20:59:18 UTC 2013
[again, the mail settings made it awkward; reply-to-all directed me to
Peter and omitted Guido, even though it is really Guido's replay of a
patch by Peter]
On 09/11/2013 08:16 AM, Peter Krempa wrote:
> When a domain has a active console connection and is destroyed the
> callback is called on private data that no longer exist causing a
> segfault.
> ---
> src/conf/virconsole.c | 3 +++
> 1 file changed, 3 insertions(+)
Missing the cherry-pick notation from patch
ba226d334acbc49f6751b430e0c4e00f69eef6bf
>
> diff --git a/src/conf/virconsole.c b/src/conf/virconsole.c
> index 443d80d..e665149 100644
> --- a/src/conf/virconsole.c
> +++ b/src/conf/virconsole.c
> @@ -222,6 +222,9 @@ static void virConsoleHashEntryFree(void *data,
> const char *pty = name;
> virStreamPtr st = data;
>
> + /* remove callback from stream */
> + virFDStreamSetInternalCloseCb(st, NULL, NULL, NULL);
> +
> /* free stream reference */
> virStreamFree(st);
>
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130911/466e04f4/attachment-0001.sig>
More information about the libvir-list
mailing list