w1_therm: Free the correct variable
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 20 May 2020 12:00:19 +0000 (15:00 +0300)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:34:10 +0000 (16:34 +0100)
commita4f6ba53b5d535a16e383f6673cb0948ee50518c
tree38b2ea000800c9ec28918521bd0746c3e0b53db5
parent4310a6219c4e9cec517937294590142f4caf8989
w1_therm: Free the correct variable

commit e420637b81f78d0fbacf539bdb1b341eba602aea upstream.

The problem is that we change "p_args" to point to the middle of the
string so when we free it at the end of the function it's not freeing
the same pointer that we originally allocated.

Fixes: e2c94d6f5720 ("w1_therm: adding alarm sysfs entry")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200520120019.GA172354@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/w1/slaves/w1_therm.c