ID:394 - close fp if isn't NULL and set it NULL afterwards in USB plugin

Commit brings back check whether fp is or isn't NULL. If fp isn't NULL, close()
is called and fp is set to NULL afterwards.
This commit is contained in:
Zdenek Styblik 2015-10-20 22:03:51 +02:00
parent 607cfe6f47
commit 5be090f047

View File

@ -147,7 +147,10 @@ scsiProbeNew(int *num_ami_devices, int *sg_nos)
}
*num_ami_devices = numdevfound;
if (fp != NULL) {
fclose(fp);
fp = NULL;
}
return 0;
}