sixaxis: Fix memory leaks
authorGopal Tiwari <gtiwari@redhat.com>
Tue, 31 May 2022 07:41:08 +0000 (13:11 +0530)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
commit7efbb92154431340f30d5354b4459f60f888dc42
tree62dade38f49e754670c9b8e4d70097cdbee914c2
parent3a0fa70ec5506564bab0d03098b6df5d4b7aa724
sixaxis: Fix memory leaks

While performing static tool analysis using coverity
found following reports for resouse leak

bluez-5.64/plugins/sixaxis.c:425: alloc_arg:
"get_pairing_type_for_device" allocates memory that is
stored into "sysfs_path".

bluez-5.64/plugins/sixaxis.c:428: leaked_storage: Variable "sysfs_path"
going out of scope leaks the storage it points to.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
plugins/sixaxis.c