mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Fix memory leak in base62_encode()
This commit is contained in:
parent
7e314b2cc3
commit
330e99381e
3 changed files with 4 additions and 4 deletions
|
|
@ -1735,7 +1735,8 @@ GList *tty_search_for_serial_devices(void)
|
|||
|
||||
// Hash remaining string to get unique topology ID
|
||||
unsigned long hash = djb2_hash((const unsigned char *)devices_path);
|
||||
char *tid = base62_encode(hash);
|
||||
char tid[5];
|
||||
base62_encode(hash, tid);
|
||||
free(devices_path);
|
||||
|
||||
// Construct the path to the device's driver symlink
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue