- fixed problems deallocation sicsobjects
This commit is contained in:
14
sicsobj.c
14
sicsobj.c
@ -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) {
|
||||
|
Reference in New Issue
Block a user