Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149966410
D34301.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
628 B
Referenced Files
None
Subscribers
None
D34301.diff
View Options
diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -270,7 +270,7 @@
static int
topology_parse(const char *opt)
{
- char *cp, *str;
+ char *cp, *str, *tofree;
if (*opt == '\0') {
set_config_value("sockets", "1");
@@ -280,7 +280,7 @@
return (0);
}
- str = strdup(opt);
+ tofree = str = strdup(opt);
if (str == NULL)
errx(4, "Failed to allocate memory");
@@ -302,11 +302,11 @@
else
set_config_value("cpus", cp);
}
- free(str);
+ free(tofree);
return (0);
out:
- free(str);
+ free(tofree);
return (-1);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 29, 11:18 AM (20 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30523793
Default Alt Text
D34301.diff (628 B)
Attached To
Mode
D34301: bhyve: memory leak in topology_parse()
Attached
Detach File
Event Timeline
Log In to Comment