projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6673ded
)
pc-bios/s390-ccw/net: fix a possible memory leak in get_uuid()
author
Yifan Luo
<luoyifan@cmss.chinamobile.com>
Wed, 14 Aug 2019 06:14:26 +0000
(14:14 +0800)
committer
Thomas Huth
<thuth@redhat.com>
Wed, 18 Sep 2019 15:47:27 +0000
(17:47 +0200)
There is a possible memory leak in get_uuid(). Should free allocated mem
before
return NULL.
Signed-off-by: Yifan Luo <luoyifan@cmss.chinamobile.com>
Message-Id: <
02cf01d55267
$
86cf2850
$
946d78f0
$@cmss.chinamobile.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
pc-bios/s390-ccw/netmain.c
patch
|
blob
|
history
diff --git
a/pc-bios/s390-ccw/netmain.c
b/pc-bios/s390-ccw/netmain.c
index f3542cb2cf118d96248a728a48a8ca2571cfdd67..f2dcc01e27257696d110b12164c97ac6c99ccc23 100644
(file)
--- 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;
}