Initialize memory before use.
This commit is contained in:
parent
2a26da3737
commit
786e4a7ae4
@ -118,6 +118,7 @@ mares_iconhd_device_open (device_t **out, const char* name)
|
||||
|
||||
// Set the default values.
|
||||
device->port = NULL;
|
||||
memset (device->fingerprint, 0, sizeof (device->fingerprint));
|
||||
|
||||
// Open the device.
|
||||
int rc = serial_open (&device->port, name);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user