* [Qemu-devel] [PATCH for-2.4] vnc: fix memory leak
@ 2015-07-22 9:08 arei.gonglei
2015-07-22 9:19 ` Daniel P. Berrange
0 siblings, 1 reply; 5+ messages in thread
From: arei.gonglei @ 2015-07-22 9:08 UTC (permalink / raw)
To: qemu-devel; +Cc: Gonglei, kraxel
From: Gonglei <arei.gonglei@huawei.com>
If vnc's password is configured, it will leak memory
which cipher variable pointed on every vnc connection.
Cc: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
ui/vnc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index 1483958..e26973a 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2520,7 +2520,7 @@ static int protocol_client_auth_vnc(VncState *vs, uint8_t *data, size_t len)
size_t i, pwlen;
unsigned char key[8];
time_t now = time(NULL);
- QCryptoCipher *cipher;
+ QCryptoCipher *cipher = NULL;
Error *err = NULL;
if (!vs->vd->password) {
@@ -2573,6 +2573,8 @@ static int protocol_client_auth_vnc(VncState *vs, uint8_t *data, size_t len)
start_client_init(vs);
}
+
+ qcrypto_cipher_free(cipher);
return 0;
reject:
@@ -2584,6 +2586,7 @@ reject:
}
vnc_flush(vs);
vnc_client_error(vs);
+ qcrypto_cipher_free(cipher);
return 0;
}
--
1.7.12.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.4] vnc: fix memory leak
2015-07-22 9:08 [Qemu-devel] [PATCH for-2.4] vnc: fix memory leak arei.gonglei
@ 2015-07-22 9:19 ` Daniel P. Berrange
2015-07-23 4:22 ` Amit Shah
0 siblings, 1 reply; 5+ messages in thread
From: Daniel P. Berrange @ 2015-07-22 9:19 UTC (permalink / raw)
To: arei.gonglei; +Cc: qemu-devel, kraxel
On Wed, Jul 22, 2015 at 05:08:53PM +0800, arei.gonglei@huawei.com wrote:
> From: Gonglei <arei.gonglei@huawei.com>
>
> If vnc's password is configured, it will leak memory
> which cipher variable pointed on every vnc connection.
>
> Cc: Daniel P. Berrange <berrange@redhat.com>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.4] vnc: fix memory leak
2015-07-22 9:19 ` Daniel P. Berrange
@ 2015-07-23 4:22 ` Amit Shah
2015-07-23 5:36 ` Paolo Bonzini
0 siblings, 1 reply; 5+ messages in thread
From: Amit Shah @ 2015-07-23 4:22 UTC (permalink / raw)
To: Daniel P. Berrange, Peter Maydell; +Cc: arei.gonglei, qemu-devel, kraxel
On (Wed) 22 Jul 2015 [10:19:52], Daniel P. Berrange wrote:
> On Wed, Jul 22, 2015 at 05:08:53PM +0800, arei.gonglei@huawei.com wrote:
> > From: Gonglei <arei.gonglei@huawei.com>
> >
> > If vnc's password is configured, it will leak memory
> > which cipher variable pointed on every vnc connection.
> >
> > Cc: Daniel P. Berrange <berrange@redhat.com>
> > Signed-off-by: Gonglei <arei.gonglei@huawei.com>
>
> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Since Gerd is away, Peter, can you pick this up directly?
Amit
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.4] vnc: fix memory leak
2015-07-23 4:22 ` Amit Shah
@ 2015-07-23 5:36 ` Paolo Bonzini
2015-07-23 8:07 ` Gonglei
0 siblings, 1 reply; 5+ messages in thread
From: Paolo Bonzini @ 2015-07-23 5:36 UTC (permalink / raw)
To: Amit Shah, Daniel P. Berrange, Peter Maydell
Cc: arei.gonglei, qemu-devel, kraxel
On 23/07/2015 06:22, Amit Shah wrote:
> On (Wed) 22 Jul 2015 [10:19:52], Daniel P. Berrange wrote:
>> > On Wed, Jul 22, 2015 at 05:08:53PM +0800, arei.gonglei@huawei.com wrote:
>>> > > From: Gonglei <arei.gonglei@huawei.com>
>>> > >
>>> > > If vnc's password is configured, it will leak memory
>>> > > which cipher variable pointed on every vnc connection.
>>> > >
>>> > > Cc: Daniel P. Berrange <berrange@redhat.com>
>>> > > Signed-off-by: Gonglei <arei.gonglei@huawei.com>
>> >
>> > Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
> Since Gerd is away, Peter, can you pick this up directly?
I've queued it and I'll send it out for -rc3.
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.4] vnc: fix memory leak
2015-07-23 5:36 ` Paolo Bonzini
@ 2015-07-23 8:07 ` Gonglei
0 siblings, 0 replies; 5+ messages in thread
From: Gonglei @ 2015-07-23 8:07 UTC (permalink / raw)
To: Paolo Bonzini, Amit Shah, Daniel P. Berrange, Peter Maydell
Cc: qemu-devel, kraxel
On 2015/7/23 13:36, Paolo Bonzini wrote:
>
>
> On 23/07/2015 06:22, Amit Shah wrote:
>> On (Wed) 22 Jul 2015 [10:19:52], Daniel P. Berrange wrote:
>>>> On Wed, Jul 22, 2015 at 05:08:53PM +0800, arei.gonglei@huawei.com wrote:
>>>>>> From: Gonglei <arei.gonglei@huawei.com>
>>>>>>
>>>>>> If vnc's password is configured, it will leak memory
>>>>>> which cipher variable pointed on every vnc connection.
>>>>>>
>>>>>> Cc: Daniel P. Berrange <berrange@redhat.com>
>>>>>> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
>>>>
>>>> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
>> Since Gerd is away, Peter, can you pick this up directly?
>
> I've queued it and I'll send it out for -rc3.
>
> Paolo
>
Thank you. :)
Regards,
-Gonglei
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-23 8:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-22 9:08 [Qemu-devel] [PATCH for-2.4] vnc: fix memory leak arei.gonglei
2015-07-22 9:19 ` Daniel P. Berrange
2015-07-23 4:22 ` Amit Shah
2015-07-23 5:36 ` Paolo Bonzini
2015-07-23 8:07 ` Gonglei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).