aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorGeordan Neukum <[email protected]>2019-05-18 02:29:58 +0000
committerGreg Kroah-Hartman <[email protected]>2019-05-20 10:29:01 +0200
commit63306de0e84059b3c4bdc8669d06a5b1832bb4ea (patch)
tree10428919e97640ee9886cb5f17097c37ca9b3104 /tools/perf/scripts/python
parent11011c03d647d95b7a09f2ca6a39fc9c9f66a1a5 (diff)
staging: kpc2000: kpc_i2c: prevent memory leak in probe() error case
The probe() function performs a kzalloc to dynamically allocate memory at runtime. If the allocation succeeds, yet invoking the function i2c_add_adapter fails, the dynamically allocated memory is never freed. Change the allocation to use the managed allocation API instead and remove the manual freeing of the memory in the remove() function. Signed-off-by: Geordan Neukum <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions