diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-11-30 01:58:45 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-11-30 13:33:16 -0500 |
commit | 7cb71df02cbe417798067a4f68a62dcbca8be025 (patch) | |
tree | 0a556bf2d5bbd15045c3347017353bc092412002 /klippy/serialqueue.h | |
parent | 55fc11ff024958bb86331bfafc5abc11a82a48fe (diff) | |
download | kutter-7cb71df02cbe417798067a4f68a62dcbca8be025.tar.gz kutter-7cb71df02cbe417798067a4f68a62dcbca8be025.tar.xz kutter-7cb71df02cbe417798067a4f68a62dcbca8be025.zip |
mcu: Be careful to free memory allocated in C code
Free steppersync, stepcompress, and commandqueue objects.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/serialqueue.h')
-rw-r--r-- | klippy/serialqueue.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/klippy/serialqueue.h b/klippy/serialqueue.h index 2a95dc14..20eefe3b 100644 --- a/klippy/serialqueue.h +++ b/klippy/serialqueue.h @@ -35,6 +35,7 @@ struct queue_message { }; struct queue_message *message_alloc_and_encode(uint32_t *data, int len); +void message_queue_free(struct list_head *root); struct pull_queue_message { uint8_t msg[MESSAGE_MAX]; @@ -47,6 +48,7 @@ struct serialqueue *serialqueue_alloc(int serial_fd, int write_only); void serialqueue_exit(struct serialqueue *sq); void serialqueue_free(struct serialqueue *sq); struct command_queue *serialqueue_alloc_commandqueue(void); +void serialqueue_free_commandqueue(struct command_queue *cq); void serialqueue_send_batch(struct serialqueue *sq, struct command_queue *cq , struct list_head *msgs); void serialqueue_send(struct serialqueue *sq, struct command_queue *cq |