1
mirror of https://gitlab.com/jessieh/qrprinter.git synced 2024-11-22 06:41:47 +00:00

Fix memory leak

This commit is contained in:
Jessie Hildebrandt 2021-10-07 15:59:04 -04:00
parent c1272d8626
commit 7fe463f89e

View File

@ -50,6 +50,9 @@ typedef enum {
/* Encode 8-bit string as QR code object */ /* Encode 8-bit string as QR code object */
QRcode* QRcode_encodeString8bit( const char* string, int version, QRecLevel level ); QRcode* QRcode_encodeString8bit( const char* string, int version, QRecLevel level );
/* Free QR code object from memory */
void QRcode_free( QRcode* qrcode );
") ")
;; ---------------------------------- ;; ;; ---------------------------------- ;;
@ -78,6 +81,7 @@ Returns a 2D sequential table of true/false values representing black/white QR m
module_black? (= (% module_data 2) 1)] module_black? (= (% module_data 2) 1)]
(table.insert row_table module_black?))) (table.insert row_table module_black?)))
(table.insert qrcode_table row_table))) (table.insert qrcode_table row_table)))
(ffi_qrencode.QRcode_free qrcode)
qrcode_table)) qrcode_table))
} }