mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-02-16 15:20:42 +01:00
monitor: Don't pass NULL as src to memcpy
Skip the memcpy when len = 0
This commit is contained in:
parent
37e6f6f08b
commit
6c2b10b118
@ -176,7 +176,8 @@ static size_t rta_add(void *rta_buf, unsigned short type, uint16_t len,
|
|||||||
|
|
||||||
rta->rta_len = rta_len;
|
rta->rta_len = rta_len;
|
||||||
rta->rta_type = type;
|
rta->rta_type = type;
|
||||||
memcpy(RTA_DATA(rta), data, len);
|
if (len)
|
||||||
|
memcpy(RTA_DATA(rta), data, len);
|
||||||
|
|
||||||
return RTA_SPACE(len);
|
return RTA_SPACE(len);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user