From 56104b5329076d45caf2e04a2271f40a2699f71f Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 5 Nov 2013 11:39:56 +0100 Subject: [PATCH] genesys: avoid dereferencing null pointer --- backend/genesys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/genesys.c b/backend/genesys.c index 9b5e4099d..9b620fca7 100644 --- a/backend/genesys.c +++ b/backend/genesys.c @@ -6631,7 +6631,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only) first_dev = dev->next; num_devices--; free (dev); - dev = prev->next; + dev = first_dev; } } /* case 2 : removed device is not first_dev */