[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/5] pc-bios/s390-ccw/net: fix a possible memory leak in get_uuid(
From: |
Christian Borntraeger |
Subject: |
[PULL 2/5] pc-bios/s390-ccw/net: fix a possible memory leak in get_uuid() |
Date: |
Mon, 23 Sep 2019 09:39:18 +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.21.0
- [PULL 0/5] s390x update, Christian Borntraeger, 2019/09/23
- [PULL 5/5] s390x/cpumodel: Add the z15 name to the description of gen15a, Christian Borntraeger, 2019/09/23
- [PULL 2/5] pc-bios/s390-ccw/net: fix a possible memory leak in get_uuid(),
Christian Borntraeger <=
- [PULL 4/5] s390x/kvm: Officially require at least kernel 3.15, Christian Borntraeger, 2019/09/23
- [PULL 1/5] pc-bios/s390-ccw: Do not pre-initialize empty array, Christian Borntraeger, 2019/09/23
- [PULL 3/5] pc-bios/s390-ccw: Rebuild the s390-netboot.img firmware image, Christian Borntraeger, 2019/09/23
- Re: [PULL 0/5] s390x update, Peter Maydell, 2019/09/23