* [Qemu-devel] [PATCH] nbd: fix memory leak on socket_connect failed
@ 2017-04-01 0:15 yaolujing
2017-04-01 14:37 ` [Qemu-devel] [PATCH for-2.9] " Eric Blake
2017-04-03 7:06 ` [Qemu-devel] [PATCH] " Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: yaolujing @ 2017-04-01 0:15 UTC (permalink / raw)
To: pbonzini, kwolf, mreitz
Cc: sochin.jiang, xieyingtai, eric.fangyi, subo7, wangjie88,
zhangshuai13, yaolujing, qemu-block, qemu-devel
From: y00357587 <yaolujing@huawei.com>
When TCP connection fails between nbd server and client,
the local var, sioc, memory leak.
This patch fixes the memory leak.
Signed-off-by: y00357587 <yaolujing@huawei.com>
---
block/nbd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/nbd.c b/block/nbd.c
index 35f24be..102285e 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -313,6 +313,7 @@ static QIOChannelSocket *nbd_establish_connection(SocketAddress *saddr,
saddr,
&local_err);
if (local_err) {
+ object_unref(OBJECT(sioc));
error_propagate(errp, local_err);
return NULL;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.9] nbd: fix memory leak on socket_connect failed
2017-04-01 0:15 [Qemu-devel] [PATCH] nbd: fix memory leak on socket_connect failed yaolujing
@ 2017-04-01 14:37 ` Eric Blake
2017-04-03 7:06 ` [Qemu-devel] [PATCH] " Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2017-04-01 14:37 UTC (permalink / raw)
To: yaolujing, pbonzini, kwolf, mreitz
Cc: xieyingtai, qemu-block, subo7, zhangshuai13, eric.fangyi,
qemu-devel, wangjie88, sochin.jiang
[-- Attachment #1: Type: text/plain, Size: 971 bytes --]
On 03/31/2017 07:15 PM, yaolujing wrote:
> From: y00357587 <yaolujing@huawei.com>
>
> When TCP connection fails between nbd server and client,
> the local var, sioc, memory leak.
>
> This patch fixes the memory leak.
>
> Signed-off-by: y00357587 <yaolujing@huawei.com>
> ---
> block/nbd.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Eric Blake <eblake@redhat.com>
>
> diff --git a/block/nbd.c b/block/nbd.c
> index 35f24be..102285e 100644
> --- a/block/nbd.c
> +++ b/block/nbd.c
> @@ -313,6 +313,7 @@ static QIOChannelSocket *nbd_establish_connection(SocketAddress *saddr,
> saddr,
> &local_err);
> if (local_err) {
> + object_unref(OBJECT(sioc));
> error_propagate(errp, local_err);
> return NULL;
> }
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] nbd: fix memory leak on socket_connect failed
2017-04-01 0:15 [Qemu-devel] [PATCH] nbd: fix memory leak on socket_connect failed yaolujing
2017-04-01 14:37 ` [Qemu-devel] [PATCH for-2.9] " Eric Blake
@ 2017-04-03 7:06 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2017-04-03 7:06 UTC (permalink / raw)
To: yaolujing, kwolf, mreitz
Cc: xieyingtai, qemu-block, subo7, zhangshuai13, eric.fangyi,
qemu-devel, wangjie88, sochin.jiang
On 01/04/2017 02:15, yaolujing wrote:
> From: y00357587 <yaolujing@huawei.com>
>
> When TCP connection fails between nbd server and client,
> the local var, sioc, memory leak.
>
> This patch fixes the memory leak.
>
> Signed-off-by: y00357587 <yaolujing@huawei.com>
> ---
> block/nbd.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/block/nbd.c b/block/nbd.c
> index 35f24be..102285e 100644
> --- a/block/nbd.c
> +++ b/block/nbd.c
> @@ -313,6 +313,7 @@ static QIOChannelSocket *nbd_establish_connection(SocketAddress *saddr,
> saddr,
> &local_err);
> if (local_err) {
> + object_unref(OBJECT(sioc));
> error_propagate(errp, local_err);
> return NULL;
> }
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-03 7:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-01 0:15 [Qemu-devel] [PATCH] nbd: fix memory leak on socket_connect failed yaolujing
2017-04-01 14:37 ` [Qemu-devel] [PATCH for-2.9] " Eric Blake
2017-04-03 7:06 ` [Qemu-devel] [PATCH] " Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.