kopia lustrzana https://gitlab.com/sane-project/frontends
src/scanadf.c: Use scanadf_exit() when listing devices
It prevents segfault in genesys backend when exiting - the backend wants to use a function which is already freed.merge-requests/7/head
rodzic
4c234b1512
commit
22d951a407
|
@ -1451,7 +1451,7 @@ main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s: sane_get_devices() failed: %s\n",
|
fprintf (stderr, "%s: sane_get_devices() failed: %s\n",
|
||||||
prog_name, sane_strstatus (status));
|
prog_name, sane_strstatus (status));
|
||||||
exit (1);
|
scanadf_exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; device_list[i]; ++i)
|
for (i = 0; device_list[i]; ++i)
|
||||||
|
@ -1460,7 +1460,7 @@ main (int argc, char **argv)
|
||||||
device_list[i]->name, device_list[i]->vendor,
|
device_list[i]->name, device_list[i]->vendor,
|
||||||
device_list[i]->model, device_list[i]->type);
|
device_list[i]->model, device_list[i]->type);
|
||||||
}
|
}
|
||||||
exit (0);
|
scanadf_exit (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'o': outputFile = optarg; break;
|
case 'o': outputFile = optarg; break;
|
||||||
|
|
Ładowanie…
Reference in New Issue