mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 20:12:44 +00:00
netsmb: Stop checking for failures from malloc(M_WAITOK)
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852
This commit is contained in:
parent
5b00557330
commit
6e50988cf8
@ -64,8 +64,6 @@ smb_rq_alloc(struct smb_connobj *layer, u_char cmd, struct smb_cred *scred,
|
||||
int error;
|
||||
|
||||
rqp = malloc(sizeof(*rqp), M_SMBRQ, M_WAITOK);
|
||||
if (rqp == NULL)
|
||||
return ENOMEM;
|
||||
error = smb_rq_init(rqp, layer, cmd, scred);
|
||||
rqp->sr_flags |= SMBR_ALLOCED;
|
||||
if (error) {
|
||||
@ -376,8 +374,6 @@ smb_t2_alloc(struct smb_connobj *layer, u_short setup, struct smb_cred *scred,
|
||||
int error;
|
||||
|
||||
t2p = malloc(sizeof(*t2p), M_SMBRQ, M_WAITOK);
|
||||
if (t2p == NULL)
|
||||
return ENOMEM;
|
||||
error = smb_t2_init(t2p, layer, setup, scred);
|
||||
t2p->t2_flags |= SMBT2_ALLOCED;
|
||||
if (error) {
|
||||
|
@ -149,8 +149,6 @@ smb_memdup(const void *umem, int len)
|
||||
if (len > 8 * 1024)
|
||||
return NULL;
|
||||
p = malloc(len, M_SMBSTR, M_WAITOK);
|
||||
if (p == NULL)
|
||||
return NULL;
|
||||
bcopy(umem, p, len);
|
||||
return p;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user