- fixed problems deallocation sicsobjects

This commit is contained in:
zolliker
2009-02-25 14:50:00 +00:00
parent 1914d04420
commit 4b82f13ab1
7 changed files with 47 additions and 48 deletions

View File

@ -84,11 +84,13 @@ static void KillSICSOBJfromNode(void *userData)
NameClass *nameClass = userData;
SICSOBJ *sicsobj;
sicsobj = FindCommandData(pServ->pSics, nameClass->name, nameClass->class);
if (sicsobj) {
sicsobj->objectNode = NULL; /* do not call RemoveHdbNodeFromParent in KillSICSOBJ */
sicsobj->pDes->parNode = NULL; /* do not free the node twice in KillSICSOBJ/DeleteDescriptor */
RemoveCommand(pServ->pSics, nameClass->name);
if (pServ->pSics != NULL) {
sicsobj = FindCommandData(pServ->pSics, nameClass->name, nameClass->class);
if (sicsobj) {
sicsobj->objectNode = NULL; /* do not call RemoveHdbNodeFromParent in KillSICSOBJ */
sicsobj->pDes->parNode = NULL; /* do not free the node twice in KillSICSOBJ/DeleteDescriptor */
RemoveCommand(pServ->pSics, nameClass->name);
}
}
free(nameClass->name);
free(nameClass->class);
@ -159,7 +161,7 @@ void KillSICSOBJ(void *data)
if (self->KillPrivate != NULL && self->pPrivate != NULL) {
self->KillPrivate(self->pPrivate);
}
if (self->objectNode != NULL) {
if (self->objectNode != NULL && pServ->pTasker != NULL) { /* not on rundown */
RemoveHdbNodeFromParent(self->objectNode, pServ->dummyCon);
}
if (self->pDes != NULL) {