ladishd: fix memory leak on room destroy

This commit is contained in:
Nedko Arnaudov 2010-11-18 03:57:31 +02:00
parent 99b1ab0da4
commit 86ec7c7fbd
1 changed files with 2 additions and 2 deletions

View File

@ -377,11 +377,11 @@ void ladish_room_destroy(ladish_room_handle room_handle)
{
/* project has either both name and dir no none of them */
ASSERT((room_ptr->project_dir == NULL && room_ptr->project_name == NULL) || (room_ptr->project_dir != NULL && room_ptr->project_name != NULL));
if (room_ptr->project_dir == NULL)
if (room_ptr->project_dir != NULL)
{
free(room_ptr->project_dir);
}
if (room_ptr->project_name == NULL)
if (room_ptr->project_name != NULL)
{
free(room_ptr->project_name);
}