fix memory leak

merge-requests/569/head
Benoit JUIN 2023-12-03 07:11:41 +01:00
rodzic 84c94b8368
commit daebecd216
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -625,10 +625,17 @@ attach_one (SANE_String_Const devname)
SANE_Status
scan_devices(){
DBG (2, "scan_devices\n");
SANE_Char config_line[PATH_MAX];
FILE *fp;
const char *lp;
num_devices = 0;
if(first_device){
DBG (2, " free first_device\n");
free(first_device);
}
first_device = NULL;
fp = sanei_config_open (LEXMARK_X2600_CONFIG_FILE);