mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05:00
netsmb: Stop checking for failures from malloc(M_WAITOK)
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 6e50988cf822f87a524b8da2fdc35b234078cc2f)
This commit is contained in:
parent
a0c4498478
commit
ce70888084
2 changed files with 0 additions and 6 deletions
|
|
@ -65,8 +65,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) {
|
||||
|
|
@ -377,8 +375,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) {
|
||||
|
|
|
|||
|
|
@ -150,8 +150,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 a new issue