summaryrefslogtreecommitdiffstats
path: root/apps/plugins/pdbox/pdbox-net.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pdbox/pdbox-net.c')
-rw-r--r--apps/plugins/pdbox/pdbox-net.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/plugins/pdbox/pdbox-net.c b/apps/plugins/pdbox/pdbox-net.c
index f0f7013488..03ef6bf6cb 100644
--- a/apps/plugins/pdbox/pdbox-net.c
+++ b/apps/plugins/pdbox/pdbox-net.c
@@ -103,7 +103,12 @@ bool receive_datagram(struct event_queue* route,
/* Copy datagram. */
memcpy(buffer, (struct datagram*) event.data, sizeof(struct datagram));
- /* Free datagram buffer. */
+ /* Clear datagram event. */
+ memset(((struct datagram*) event.data)->data,
+ 0,
+ ((struct datagram*) event.data)->size);
+
+ /* Free datagram event. */
((struct datagram*) event.data)->used = false;
/* Everything went ok. */