[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PULL 31/34] pc-bios/s390-ccw/net: fix a possible memory le
From: |
Cornelia Huck |
Subject: |
[qemu-s390x] [PULL 31/34] pc-bios/s390-ccw/net: fix a possible memory leak in get_uuid() |
Date: |
Thu, 19 Sep 2019 14:41:12 +0200 |
From: Yifan Luo <address@hidden>
There is a possible memory leak in get_uuid(). Should free allocated mem
before
return NULL.
Signed-off-by: Yifan Luo <address@hidden>
Message-Id: <02cf01d55267$86cf2850$946d78f0$@cmss.chinamobile.com>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>
---
pc-bios/s390-ccw/netmain.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/pc-bios/s390-ccw/netmain.c b/pc-bios/s390-ccw/netmain.c
index f3542cb2cf11..f2dcc01e2725 100644
--- a/pc-bios/s390-ccw/netmain.c
+++ b/pc-bios/s390-ccw/netmain.c
@@ -269,6 +269,7 @@ static const char *get_uuid(void)
: "d" (r0), "d" (r1), [addr] "a" (buf)
: "cc", "memory");
if (cc) {
+ free(mem);
return NULL;
}
--
2.20.1
- [qemu-s390x] [PULL 00/34] s390x update, Cornelia Huck, 2019/09/19
- [qemu-s390x] [PULL 34/34] s390x/cpumodel: Add the z15 name to the description of gen15a, Cornelia Huck, 2019/09/19
- [qemu-s390x] [PULL 33/34] s390x/kvm: Officially require at least kernel 3.15, Cornelia Huck, 2019/09/19
- [qemu-s390x] [PULL 31/34] pc-bios/s390-ccw/net: fix a possible memory leak in get_uuid(),
Cornelia Huck <=
- [qemu-s390x] [PULL 32/34] pc-bios/s390-ccw: Rebuild the s390-netboot.img firmware image, Cornelia Huck, 2019/09/19
- [qemu-s390x] [PULL 30/34] pc-bios/s390-ccw: Do not pre-initialize empty array, Cornelia Huck, 2019/09/19
- [qemu-s390x] [PULL 29/34] tests/tcg: target/s390x: Test MVO, Cornelia Huck, 2019/09/19
- [qemu-s390x] [PULL 28/34] s390x/tcg: MVO: Fault-safe handling, Cornelia Huck, 2019/09/19
- [qemu-s390x] [PULL 27/34] s390x/tcg: MVST: Fault-safe handling, Cornelia Huck, 2019/09/19
- [qemu-s390x] [PULL 25/34] s390x/tcg: MVN: Fault-safe handling, Cornelia Huck, 2019/09/19
- [qemu-s390x] [PULL 23/34] s390x/tcg: NC: Fault-safe handling, Cornelia Huck, 2019/09/19
- [qemu-s390x] [PULL 24/34] s390x/tcg: MVCIN: Fault-safe handling, Cornelia Huck, 2019/09/19
- [qemu-s390x] [PULL 26/34] s390x/tcg: MVZ: Fault-safe handling, Cornelia Huck, 2019/09/19
- [qemu-s390x] [PULL 21/34] s390x/tcg: OC: Fault-safe handling, Cornelia Huck, 2019/09/19