projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Static analyzer bug fixes
[silc.git]
/
apps
/
silcd
/
serverid.c
diff --git
a/apps/silcd/serverid.c
b/apps/silcd/serverid.c
index 73641c65dd13449a7dce351be999dab4db56f420..c820967dd79312bb997d2b4a10b9e79b71a0f1c5 100644
(file)
--- a/
apps/silcd/serverid.c
+++ b/
apps/silcd/serverid.c
@@
-66,6
+66,8
@@
SilcBool silc_id_create_client_id(SilcServer server,
SILC_LOG_DEBUG(("Creating new Client ID"));
*new_id = silc_calloc(1, sizeof(**new_id));
SILC_LOG_DEBUG(("Creating new Client ID"));
*new_id = silc_calloc(1, sizeof(**new_id));
+ if (!(*new_id))
+ return FALSE;
/* Create hash of the nickname (it's already checked as valid identifier
string). */
/* Create hash of the nickname (it's already checked as valid identifier
string). */
@@
-116,6
+118,8
@@
SilcBool silc_id_create_channel_id(SilcServer server,
SILC_LOG_DEBUG(("Creating new Channel ID"));
*new_id = silc_calloc(1, sizeof(**new_id));
SILC_LOG_DEBUG(("Creating new Channel ID"));
*new_id = silc_calloc(1, sizeof(**new_id));
+ if (!(*new_id))
+ return FALSE;
/* Create the ID */
memcpy((*new_id)->ip.data, router_id->ip.data, router_id->ip.data_len);
/* Create the ID */
memcpy((*new_id)->ip.data, router_id->ip.data, router_id->ip.data_len);