[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 62/88] l2tpv3: fix possible double free
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 62/88] l2tpv3: fix possible double free |
Date: |
Thu, 8 Jan 2015 11:34:06 -0600 |
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>
(cherry picked from commit 77374582ab961af2c5e702f767f52179d5f7676c)
Signed-off-by: Michael Roth <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.9.1
- [Qemu-stable] [PATCH 55/88] snapshot: add bdrv_drain_all() to bdrv_snapshot_delete() to avoid concurrency problem, (continued)
- [Qemu-stable] [PATCH 55/88] snapshot: add bdrv_drain_all() to bdrv_snapshot_delete() to avoid concurrency problem, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 54/88] hw/xtensa/xtfpga: treat uImage load address as virtual, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 23/88] ivshmem: Fix potential OOB r/w access, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 58/88] target-xtensa: add missing window check for entry, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 60/88] virtio-scsi: work around bug in old BIOSes, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 59/88] kvm: Fix memory slot page alignment logic, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 63/88] exec: Handle multipage ranges in invalidate_and_set_dirty(), Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 61/88] libcacard: fix resource leak, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 64/88] hw/ide/core.c: Prevent SIGSEGV during migration, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 65/88] virtio-net: fix unmap leak, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 62/88] l2tpv3: fix possible double free,
Michael Roth <=
- [Qemu-stable] [PATCH 67/88] block: Omit bdrv_find_format for essential drivers, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 66/88] block: Make essential BlockDriver objects public, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 71/88] qemu-img: Check create_opts before image creation, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 68/88] block/vvfat: qcow driver may not be found, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 69/88] block/nfs: Add create_opts, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 72/88] qemu-img: Check create_opts before image amendment, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 73/88] iotests: Only kill NBD server if it runs, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 74/88] iotests: Add test for unsupported image creation, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 70/88] block: Check create_opts before image creation, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 76/88] qcow2: Flushing the caches in qcow2_close may fail, Michael Roth, 2015/01/08