fix memleak when reusing an already stored device

merge-requests/1/head
Stphane Voltz 2013-03-09 12:04:55 +01:00
rodzic a0b45146e1
commit d45f1bec5a
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -372,6 +372,10 @@ store_device (device_list_type device)
devices[i].missing=0;
DBG (3, "store_device: not storing device %s\n", device.devname);
/* since devname has been created by strdup()
* we have to free it to avoid leaking memory */
free(device.devname);
return;
}
if (devices[i].missing >= 2)