bugfix: Strdup the generated mac address

This commit is contained in:
Henrik Rydgard 2014-06-30 01:08:45 +02:00
parent 32a11dc28d
commit 2d05b6e5e8

View file

@ -248,7 +248,8 @@ const char *CreateRandMAC() {
randStream << ':'; //we need a : between every octet randStream << ':'; //we need a : between every octet
} }
} }
return randStream.str().c_str(); //no need for creating a new string, just return this // It's ok to strdup, this runs once and will be freed by exiting the process anyway
return strdup(randStream.str().c_str()); //no need for creating a new string, just return this
} }
static int DefaultNumWorkers() { static int DefaultNumWorkers() {