move free call
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
#include <fsfw/serviceinterface.h>
|
||||
|
||||
SerialCookie::SerialCookie(object_id_t handlerId, std::string deviceFile, UartBaudRate baudrate,
|
||||
size_t maxReplyLen, UartModes uartMode)
|
||||
size_t maxReplyLen, UartModes uartMode)
|
||||
: handlerId(handlerId),
|
||||
deviceFile(deviceFile),
|
||||
uartMode(uartMode),
|
||||
|
@ -30,7 +30,7 @@ class SerialCookie : public CookieIF {
|
||||
* One stop bit
|
||||
*/
|
||||
SerialCookie(object_id_t handlerId, std::string deviceFile, UartBaudRate baudrate,
|
||||
size_t maxReplyLen, UartModes uartMode = UartModes::NON_CANONICAL);
|
||||
size_t maxReplyLen, UartModes uartMode = UartModes::NON_CANONICAL);
|
||||
|
||||
virtual ~SerialCookie();
|
||||
|
||||
|
@ -20,15 +20,15 @@ UioMapper::UioMapper(std::string uioFile, int mapNum) : mapNum(mapNum) {
|
||||
if (S_ISLNK(buf.st_mode)) {
|
||||
char* res = realpath(uioFile.c_str(), nullptr);
|
||||
if (res) {
|
||||
this->uioFile = res;
|
||||
uioFile = res;
|
||||
free(res);
|
||||
} else {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Could not resolve real path of UIO file " << uioFile << std::endl;
|
||||
#endif
|
||||
}
|
||||
free(res);
|
||||
} else {
|
||||
this->uioFile = std::move(uioFile);
|
||||
uioFile = std::move(uioFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user