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:
Zhenlei Huang 2024-09-03 18:25:20 +08:00
parent a0c4498478
commit ce70888084
2 changed files with 0 additions and 6 deletions

View file

@ -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) {

View file

@ -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;
}