Skip to content

Commit

Permalink
Clear buffer when done processing fragmented data to free the memory (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gmartin82 authored Dec 6, 2023
1 parent ac566f5 commit 74f9a06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/transport/multicast/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ int8_t _z_multicast_send_n_msg(_z_session_t *zn, const _z_network_message_t *n_m
}
}
}

// Clear the buffer as it's no longer required
_z_wbuf_clear(&fbf);
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/transport/unicast/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ int8_t _z_unicast_send_n_msg(_z_session_t *zn, const _z_network_message_t *n_msg
}
}
}

// Clear the buffer as it's no longer required
_z_wbuf_clear(&fbf);
}
}

Expand Down

0 comments on commit 74f9a06

Please sign in to comment.