Handle some more memory allocation failures

This commit is contained in:
Drew DeVault 2016-12-15 18:03:59 -05:00
parent d75a747a3d
commit 8cef81d6f2
5 changed files with 25 additions and 1 deletions

View file

@ -121,6 +121,9 @@ void input_cmd_apply(struct input_config *input) {
for (int i = 0; i < input_devices->length; ++i) {
device = input_devices->items[i];
char* dev_identifier = libinput_dev_unique_id(device);
if (!dev_identifier) {
break;
}
int match = dev_identifier && strcmp(dev_identifier, input->identifier) == 0;
free(dev_identifier);
if (match) {