Commit 7316fef
Benjamin Tissoires
HID: core: remove one more kmemdup on .probe()
That last kmemdup while opening the report descriptor was required to
have a common kfree() on it.
Move that kmemdup in the only special case it's required (if there is a
.report_fixup()), and add a more elaborated check before freeing
hdev->rdesc, to avoid a double free.
Reviewed-by: Peter Hutterer <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Benjamin Tissoires <[email protected]>1 parent 52cd190 commit 7316fef
1 file changed
+20
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
685 | 685 | | |
686 | 686 | | |
687 | 687 | | |
688 | | - | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
689 | 696 | | |
690 | 697 | | |
691 | 698 | | |
| |||
1214 | 1221 | | |
1215 | 1222 | | |
1216 | 1223 | | |
1217 | | - | |
1218 | 1224 | | |
1219 | 1225 | | |
1220 | 1226 | | |
| |||
1241 | 1247 | | |
1242 | 1248 | | |
1243 | 1249 | | |
1244 | | - | |
| 1250 | + | |
| 1251 | + | |
1245 | 1252 | | |
1246 | 1253 | | |
1247 | 1254 | | |
1248 | 1255 | | |
1249 | | - | |
1250 | 1256 | | |
1251 | | - | |
1252 | | - | |
1253 | | - | |
1254 | | - | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
1255 | 1267 | | |
1256 | 1268 | | |
1257 | 1269 | | |
| |||
0 commit comments