struct ProtoFunctionHook *p;
p = (struct ProtoFunctionHook *)
- mallok(sizeof(struct ProtoFunctionHook));
+ malloc(sizeof(struct ProtoFunctionHook));
if (p == NULL) {
fprintf(stderr, "can't malloc new ProtoFunctionHook\n");
if (cur == ProtoHookList) {
ProtoHookList = p;
}
- phree(cur);
+ free(cur);
cur = p;
}
}
struct LogFunctionHook *newfcn;
newfcn = (struct LogFunctionHook *)
- mallok(sizeof(struct LogFunctionHook));
+ malloc(sizeof(struct LogFunctionHook));
newfcn->next = LogHookTable;
newfcn->h_function_pointer = fcn_ptr;
newfcn->loglevel = loglevel;
if (cur == LogHookTable) {
LogHookTable = p;
}
- phree(cur);
+ free(cur);
cur = p;
}
}
struct CleanupFunctionHook *newfcn;
newfcn = (struct CleanupFunctionHook *)
- mallok(sizeof(struct CleanupFunctionHook));
+ malloc(sizeof(struct CleanupFunctionHook));
newfcn->next = CleanupHookTable;
newfcn->h_function_pointer = fcn_ptr;
CleanupHookTable = newfcn;
if (cur == CleanupHookTable) {
CleanupHookTable = p;
}
- phree(cur);
+ free(cur);
cur = p;
}
}
struct SessionFunctionHook *newfcn;
newfcn = (struct SessionFunctionHook *)
- mallok(sizeof(struct SessionFunctionHook));
+ malloc(sizeof(struct SessionFunctionHook));
newfcn->next = SessionHookTable;
newfcn->h_function_pointer = fcn_ptr;
newfcn->eventtype = EventType;
if (cur == SessionHookTable) {
SessionHookTable = p;
}
- phree(cur);
+ free(cur);
cur = p;
}
}
struct UserFunctionHook *newfcn;
newfcn = (struct UserFunctionHook *)
- mallok(sizeof(struct UserFunctionHook));
+ malloc(sizeof(struct UserFunctionHook));
newfcn->next = UserHookTable;
newfcn->h_function_pointer = fcn_ptr;
newfcn->eventtype = EventType;
if (cur == UserHookTable) {
UserHookTable = p;
}
- phree(cur);
+ free(cur);
cur = p;
}
}
struct MessageFunctionHook *newfcn;
newfcn = (struct MessageFunctionHook *)
- mallok(sizeof(struct MessageFunctionHook));
+ malloc(sizeof(struct MessageFunctionHook));
newfcn->next = MessageHookTable;
newfcn->h_function_pointer = handler;
newfcn->eventtype = EventType;
if (cur == MessageHookTable) {
MessageHookTable = p;
}
- phree(cur);
+ free(cur);
cur = p;
}
}
struct NetprocFunctionHook *newfcn;
newfcn = (struct NetprocFunctionHook *)
- mallok(sizeof(struct NetprocFunctionHook));
+ malloc(sizeof(struct NetprocFunctionHook));
newfcn->next = NetprocHookTable;
newfcn->h_function_pointer = handler;
NetprocHookTable = newfcn;
if (cur == NetprocHookTable) {
NetprocHookTable = p;
}
- phree(cur);
+ free(cur);
cur = p;
}
}
struct DeleteFunctionHook *newfcn;
newfcn = (struct DeleteFunctionHook *)
- mallok(sizeof(struct DeleteFunctionHook));
+ malloc(sizeof(struct DeleteFunctionHook));
newfcn->next = DeleteHookTable;
newfcn->h_function_pointer = handler;
DeleteHookTable = newfcn;
if (cur == DeleteHookTable) {
DeleteHookTable = p;
}
- phree(cur);
+ free(cur);
cur = p;
}
}
struct XmsgFunctionHook *newfcn;
newfcn = (struct XmsgFunctionHook *)
- mallok(sizeof(struct XmsgFunctionHook));
+ malloc(sizeof(struct XmsgFunctionHook));
newfcn->next = XmsgHookTable;
newfcn->order = order;
newfcn->h_function_pointer = fcn_ptr;
if (cur == XmsgHookTable) {
XmsgHookTable = p;
}
- phree(cur);
+ free(cur);
cur = p;
}
}
char message[SIZ];
newfcn = (struct ServiceFunctionHook *)
- mallok(sizeof(struct ServiceFunctionHook));
+ malloc(sizeof(struct ServiceFunctionHook));
newfcn->next = ServiceHookTable;
newfcn->tcp_port = tcp_port;
newfcn->sockpath = sockpath;
}
else if (tcp_port <= 0) { /* port -1 to disable */
lprintf(CTDL_INFO, "Service has been manually disabled, skipping\n");
- phree(newfcn);
+ free(newfcn);
return;
}
else {
else {
strcat(message, "FAILED.");
lprintf(CTDL_CRIT, "%s\n", message);
- phree(newfcn);
+ free(newfcn);
}
}
if (cur == ServiceHookTable) {
ServiceHookTable = p;
}
- phree(cur);
+ free(cur);
cur = p;
}
}