aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-03-05 11:39:02 +0100
committerMatthew Smith <mgsmith@netgate.com>2021-03-05 14:27:58 +0000
commit9cc765559c39a299bdb55f3f7279abbcbe00a556 (patch)
tree11db8da401668ffa41ca71824c54da0ecc656575 /src/plugins
parentd89de31489cc0fb0c3d606fe9b30a97934942e80 (diff)
avf: don't memcpy if adminq output buffer size is 0
Type: fix Change-Id: I0df14ff87d0bf51eeb392f72434febf6c4a2957a Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/avf/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c
index 139f1c99ebb..fd173980ba1 100644
--- a/src/plugins/avf/device.c
+++ b/src/plugins/avf/device.c
@@ -485,7 +485,7 @@ retry:
goto done;
}
- if (d->flags & AVF_AQ_F_BUF)
+ if (out_len && d->flags & AVF_AQ_F_BUF)
{
void *buf = ad->arq_bufs + ad->arq_next_slot * AVF_MBOX_BUF_SZ;
clib_memcpy_fast (out, buf, out_len);