mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 19:03:03 +01:00
QR: close file descriptor on error
This commit is contained in:
parent
6bc5d8c543
commit
71040355fd
@ -54,8 +54,10 @@ int ID_to_QRcode_txt(const char *tox_id, const char *outfile)
|
||||
|
||||
QRcode *qr_obj = QRcode_encodeString(tox_id, 0, QR_ECLEVEL_L, QR_MODE_8, 0);
|
||||
|
||||
if (qr_obj == NULL)
|
||||
if (qr_obj == NULL) {
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
size_t width = qr_obj->width;
|
||||
size_t i, j;
|
||||
|
Loading…
Reference in New Issue
Block a user