[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/12] chardev: remove unused 'sioc' variable &
From: |
Daniel P . Berrangé |
Subject: |
Re: [Qemu-devel] [PATCH 06/12] chardev: remove unused 'sioc' variable & cleanup paths |
Date: |
Wed, 16 Jan 2019 09:34:36 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Wed, Jan 16, 2019 at 06:24:49AM +0100, Thomas Huth wrote:
> On 2019-01-15 15:52, Daniel P. Berrangé wrote:
> > The 'sioc' variable in qmp_chardev_open_socket was unused since
> >
> > commit 3e7d4d20d3a528b1ed10b1dc3d83119bfb0c5f24
> > Author: Peter Xu <address@hidden>
> > Date: Tue Mar 6 13:33:17 2018 +0800
> >
> > chardev: use chardev's gcontext for async connect
> [...]
> > -error:
> > - if (sioc) {
> > - object_unref(OBJECT(sioc));
> > - }
>
> So who is doing the object_unref() now in case of errors? That commit
> did not take care of it ... so it sounds like we could be leaving
> references behind in case of errors here?
As shown in the patch diff chunks, no code is ever setting "sioc" in
this method, so it can't ever be non-NULL
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- [Qemu-devel] [PATCH 04/12] chardev: remove many local variables in qemu_chr_parse_socket, (continued)
- [Qemu-devel] [PATCH 07/12] chardev: split tcp_chr_wait_connected into two methods, Daniel P . Berrangé, 2019/01/15
- [Qemu-devel] [PATCH 08/12] chardev: split up qmp_chardev_open_socket connection code, Daniel P . Berrangé, 2019/01/15
- [Qemu-devel] [PATCH 09/12] chardev: use a state machine for socket connection state, Daniel P . Berrangé, 2019/01/15
- [Qemu-devel] [PATCH 10/12] chardev: honour the reconnect setting in tcp_chr_wait_connected, Daniel P . Berrangé, 2019/01/15
- [Qemu-devel] [PATCH 11/12] chardev: disallow TLS/telnet/websocket with tcp_chr_wait_connected, Daniel P . Berrangé, 2019/01/15