mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-31 23:02:05 +00:00
use calloc for allocating arc4random structs
ok dtucker
This commit is contained in:
parent
4403b62f55
commit
ea6fdf9a1a
@ -75,9 +75,9 @@ _rs_allocate(struct _rs **rsp, struct _rsx **rsxp)
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if ((*rsp = malloc(sizeof(**rsp))) == NULL)
|
if ((*rsp = calloc(1, sizeof(**rsp))) == NULL)
|
||||||
return (-1);
|
return (-1);
|
||||||
if ((*rsxp = malloc(sizeof(**rsxp))) == NULL) {
|
if ((*rsxp = calloc(1, sizeof(**rsxp))) == NULL) {
|
||||||
free(*rsp);
|
free(*rsp);
|
||||||
*rsp = NULL;
|
*rsp = NULL;
|
||||||
return (-1);
|
return (-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user