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/chelper.py | |
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/chelper.py')
-rw-r--r-- | klippy/chelper.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/klippy/chelper.py b/klippy/chelper.py index bf7a1ab5..cca91b43 100644 --- a/klippy/chelper.py +++ b/klippy/chelper.py @@ -15,6 +15,7 @@ defs_stepcompress = """ struct stepcompress *stepcompress_alloc(uint32_t max_error , uint32_t queue_step_msgid, uint32_t set_next_step_dir_msgid , uint32_t invert_sdir, uint32_t oid); + void stepcompress_free(struct stepcompress *sc); void stepcompress_push(struct stepcompress *sc, double step_clock , int32_t sdir); int32_t stepcompress_push_factor(struct stepcompress *sc @@ -38,6 +39,7 @@ defs_stepcompress = """ struct steppersync *steppersync_alloc(struct serialqueue *sq , struct stepcompress **sc_list, int sc_num, int move_num); + void steppersync_free(struct steppersync *ss); void steppersync_flush(struct steppersync *ss, uint64_t move_clock); """ @@ -53,6 +55,7 @@ defs_serialqueue = """ 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(struct serialqueue *sq, struct command_queue *cq , uint8_t *msg, int len, uint64_t min_clock, uint64_t req_clock); void serialqueue_encode_and_send(struct serialqueue *sq |