[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/12] l2tpv3: fix possible double free
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 02/12] l2tpv3: fix possible double free |
Date: |
Mon, 17 Nov 2014 18:08:09 +0100 |
From: zhanghailiang <address@hidden>
freeaddrinfo(result) does not assign result = NULL, after frees it.
There will be a double free when it goes error case.
It is reported by covertiy.
Reviewed-by: Gonglei <address@hidden>
Cc: address@hidden
Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
net/l2tpv3.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/l2tpv3.c b/net/l2tpv3.c
index 528d95b..65db5ef 100644
--- a/net/l2tpv3.c
+++ b/net/l2tpv3.c
@@ -660,7 +660,6 @@ int net_init_l2tpv3(const NetClientOptions *opts,
if (fd == -1) {
fd = -errno;
error_report("l2tpv3_open : socket creation failed, errno = %d", -fd);
- freeaddrinfo(result);
goto outerr;
}
if (bind(fd, (struct sockaddr *) result->ai_addr, result->ai_addrlen)) {
--
1.8.3.1
- [Qemu-devel] [PULL 00/12] Coverity fixes for 2.2.0-rc2, Paolo Bonzini, 2014/11/17
- [Qemu-devel] [PULL 01/12] libcacard: fix resource leak, Paolo Bonzini, 2014/11/17
- [Qemu-devel] [PULL 02/12] l2tpv3: fix possible double free,
Paolo Bonzini <=
- [Qemu-devel] [PULL 03/12] l2tpv3: fix fd leak, Paolo Bonzini, 2014/11/17
- [Qemu-devel] [PULL 04/12] mips_mipssim: fix use-after-free for filename, Paolo Bonzini, 2014/11/17
- [Qemu-devel] [PULL 06/12] loader: fix NEGATIVE_RETURNS, Paolo Bonzini, 2014/11/17
- [Qemu-devel] [PULL 05/12] qga: fix false negative argument passing, Paolo Bonzini, 2014/11/17
- [Qemu-devel] [PULL 07/12] nvme: remove superfluous check, Paolo Bonzini, 2014/11/17
- [Qemu-devel] [PULL 08/12] acl: fix memory leak, Paolo Bonzini, 2014/11/17
- [Qemu-devel] [PULL 09/12] qemu-char: fix MISSING_COMMA, Paolo Bonzini, 2014/11/17
- [Qemu-devel] [PULL 10/12] shpc: fix error propaagation, Paolo Bonzini, 2014/11/17
- [Qemu-devel] [PULL 11/12] target-cris/translate.c: fix out of bounds read, Paolo Bonzini, 2014/11/17
- [Qemu-devel] [PULL 12/12] hcd-musb: fix dereference null return value, Paolo Bonzini, 2014/11/17