fix memleak

Origin commit data
------------------
Branch: ni/coolstream
Commit: b3db5f7f7c
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-10-16 (Tue, 16 Oct 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2012-10-16 15:42:10 +02:00
parent 122e3fade5
commit fdb113c9b3
3 changed files with 5 additions and 5 deletions

View File

@@ -308,7 +308,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
default:
//printf("[motorcontrol] message received...\n");
if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000))
delete (unsigned char*) data;
delete[] (unsigned char*) data;
break;
}
}
@@ -424,7 +424,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
default:
//printf("[motorcontrol] message received...\n");
if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000))
delete (unsigned char*) data;
delete[] (unsigned char*) data;
break;
}
}