- free memory allocated by sane_get_devices()
merge-requests/1/head
Stéphane Voltz 2015-08-10 21:38:16 +02:00
rodzic 39695d73c2
commit f73b2e3dbf
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -73,6 +73,7 @@
#define MAX(a,b) ((a) > (b) ? (a) : (b))
static const SANE_Device **devlist = NULL;
static int num_devices = 0;
static Ricoh_Device *first_dev = NULL;
static Ricoh_Scanner *first_handle = NULL;
@ -535,6 +536,9 @@ sane_exit (void)
free ((void *) dev->sane.model);
free (dev);
}
if (devlist)
free (devlist);
DBG (11, "<< sane_exit\n");
}
@ -542,7 +546,6 @@ sane_exit (void)
SANE_Status
sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
{
static const SANE_Device **devlist = 0;
Ricoh_Device *dev;
int i;