Input: wacom: NULL dereference on allocation failure
Subsystems (3)
PATCH 1/1 Input: wacom: NULL dereference on allocation failure
If the "wac_i2c" alloction fails, then it leads to a NULL dereference.
Signed-off-by Dan Carpenter <[email protected]>
drivers/input/touchscreen/wacom_i2c.c +1 -1
@@ -252,7 +252,7 @@ static int __devinit wacom_i2c_probe(struct i2c_client *client, err_free_irq:free_irq (client->irq, wac_i2c); err_free_mem: -input_free_device (wac_i2c->input); +input_free_device (input);kfree (wac_i2c);return error;
Dmitry Torokhov
maintainerQuoted 3 lines · Dan Carpenter
If the "
wac_i2c" alloction fails, then it leads to a NULL dereference.Signed-off-by Dan Carpenter <[email protected]>
Doh! I'll fold it up into original...
Thanks Dan!
Quoted 14 lines
drivers/input/touchscreen/wacom_i2c.c +1
-1@@ -252,7 +252,7 @@ static int __devinit wacom_i2c_probe(struct i2c_client *client, err_free_irq:free_irq (client->irq, wac_i2c); err_free_mem: -input_free_device (wac_i2c->input); +input_free_device (input);kfree (wac_i2c);return error;
Signature · 1 line
Dmitry