1
mirror of https://gitlab.com/jessieh/qrprinter.git synced 2024-11-21 22:31:46 +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

@ -48,7 +48,10 @@ typedef enum {
} QRecLevel;
/* 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)]
(table.insert row_table module_black?)))
(table.insert qrcode_table row_table)))
(ffi_qrencode.QRcode_free qrcode)
qrcode_table))
}