[PATCH v2 BlueZ 2/6] input: Use g_free() where appropriate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



req->rd_data was allocated with g_try_malloc0(), therefore it should be
freed with g_free().
---
 profiles/input/device.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/profiles/input/device.c b/profiles/input/device.c
index 7655534..ca1ce8b 100644
--- a/profiles/input/device.c
+++ b/profiles/input/device.c
@@ -285,7 +285,7 @@ static void encrypt_completed(uint8_t status, gpointer user_data)
 	close(req->ctrl_sock);
 
 cleanup:
-	free(req->rd_data);
+	g_free(req->rd_data);
 
 	g_free(req);
 }
@@ -376,7 +376,7 @@ static int hidp_add_connection(struct input_device *idev)
 	err = ioctl_connadd(req);
 
 cleanup:
-	free(req->rd_data);
+	g_free(req->rd_data);
 	g_free(req);
 
 	return err;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux