projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mon Jun 18 22:21:37 CEST 2007 Jochen Eisinger <coffee@silcnet.org>
[silc.git]
/
lib
/
silcclient
/
command_reply.c
diff --git
a/lib/silcclient/command_reply.c
b/lib/silcclient/command_reply.c
index 5c64922e3992af206be3aded6576c9f6a421f96c..13fab10a168ad506500ec3996b8be031ef4c3ccd 100644
(file)
--- a/
lib/silcclient/command_reply.c
+++ b/
lib/silcclient/command_reply.c
@@
-131,7
+131,7
@@
void silc_client_command_reply_process(SilcClient client,
/* No specific identifier for command reply, call first one found */
(*reply)(ctx, NULL);
else
/* No specific identifier for command reply, call first one found */
(*reply)(ctx, NULL);
else
- silc_free(ctx);
+ silc_
client_command_reply_
free(ctx);
}
}
}
}
@@
-155,6
+155,8
@@
void silc_client_command_reply_free(SilcClientCommandReplyContext cmd)
SILC_LOG_DEBUG(("Command reply context %p refcnt %d->%d", cmd,
cmd->users + 1, cmd->users));
if (cmd->users < 1) {
SILC_LOG_DEBUG(("Command reply context %p refcnt %d->%d", cmd,
cmd->users + 1, cmd->users));
if (cmd->users < 1) {
+ if (cmd->callbacks)
+ silc_free(cmd->callbacks);
silc_command_payload_free(cmd->payload);
silc_free(cmd);
}
silc_command_payload_free(cmd->payload);
silc_free(cmd);
}
@@
-934,7
+936,7
@@
SILC_CLIENT_CMD_REPLY_FUNC(ping)
{
SilcClientCommandReplyContext cmd = (SilcClientCommandReplyContext)context;
SilcClientConnection conn = (SilcClientConnection)cmd->sock->user_data;
{
SilcClientCommandReplyContext cmd = (SilcClientCommandReplyContext)context;
SilcClientConnection conn = (SilcClientConnection)cmd->sock->user_data;
- void *id;
+ void *id
= NULL
;
int i;
time_t diff, curtime;
int i;
time_t diff, curtime;
@@
-972,12
+974,12
@@
SILC_CLIENT_CMD_REPLY_FUNC(ping)
}
}
}
}
- silc_free(id);
-
/* Notify application */
COMMAND_REPLY((SILC_ARGS));
out:
/* Notify application */
COMMAND_REPLY((SILC_ARGS));
out:
+ if (id)
+ silc_free(id);
SILC_CLIENT_PENDING_EXEC(cmd, SILC_COMMAND_PING);
silc_client_command_reply_free(cmd);
}
SILC_CLIENT_PENDING_EXEC(cmd, SILC_COMMAND_PING);
silc_client_command_reply_free(cmd);
}