fix some memory leaks
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16323 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
718a665ba9
commit
2dd13cc8fe
@ -32,6 +32,13 @@ Keymap::Keymap()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Keymap::~Keymap()
|
||||||
|
{
|
||||||
|
if (fChars)
|
||||||
|
free(fChars);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Keymap::GetKey( char *chars, int32 offset, char* string)
|
Keymap::GetKey( char *chars, int32 offset, char* string)
|
||||||
{
|
{
|
||||||
@ -239,7 +246,7 @@ Keymap::LoadCurrent()
|
|||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
memcpy(&fKeys, keys, sizeof(fKeys));
|
memcpy(&fKeys, keys, sizeof(fKeys));
|
||||||
delete keys;
|
free(keys);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|
||||||
#else // ! __BEOS__
|
#else // ! __BEOS__
|
||||||
|
@ -24,6 +24,7 @@ class Keymap
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Keymap();
|
Keymap();
|
||||||
|
~Keymap();
|
||||||
status_t LoadCurrent();
|
status_t LoadCurrent();
|
||||||
status_t Load(entry_ref &ref);
|
status_t Load(entry_ref &ref);
|
||||||
status_t Save(entry_ref &ref);
|
status_t Save(entry_ref &ref);
|
||||||
|
Loading…
Reference in New Issue
Block a user