mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-02 01:17:52 +03:00
messages: Use calloc in ssh_message_new()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -63,14 +63,15 @@
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static ssh_message ssh_message_new(ssh_session session){
|
static ssh_message ssh_message_new(ssh_session session)
|
||||||
ssh_message msg = malloc(sizeof(struct ssh_message_struct));
|
{
|
||||||
if (msg == NULL) {
|
ssh_message msg = calloc(1, sizeof(struct ssh_message_struct));
|
||||||
return NULL;
|
if (msg == NULL) {
|
||||||
}
|
return NULL;
|
||||||
ZERO_STRUCTP(msg);
|
}
|
||||||
msg->session = session;
|
msg->session = session;
|
||||||
return msg;
|
|
||||||
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WITH_SERVER
|
#ifndef WITH_SERVER
|
||||||
|
|||||||
Reference in New Issue
Block a user