diff mbox series

[7/7] qmimodem: Use l_free in qmi_free for consistency

Message ID 20240221212212.181401-7-steve.schrock@getcruise.com (mailing list archive)
State Superseded
Headers show
Series [1/7] qmimodem: Use l_queue_remove_if to eliminate double lookup | expand

Commit Message

Steve Schrock Feb. 21, 2024, 9:22 p.m. UTC
Eliminate the final gchar* as well.
---
 drivers/qmimodem/qmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/qmimodem/qmi.c b/drivers/qmimodem/qmi.c
index ba6ae0d2..52a8e57c 100644
--- a/drivers/qmimodem/qmi.c
+++ b/drivers/qmimodem/qmi.c
@@ -174,7 +174,7 @@  struct qmi_tlv_hdr {
 
 void qmi_free(void *ptr)
 {
-	free(ptr);
+	l_free(ptr);
 }
 
 static struct qmi_request *__request_alloc(uint8_t service,
@@ -1424,7 +1424,7 @@  static char *get_device_interface(struct qmi_device *device)
 	file_name = basename(file_path);
 
 	for (i = 0; i < L_ARRAY_SIZE(driver_names) && !interface; i++) {
-		gchar *sysfs_path;
+		char *sysfs_path;
 
 		sysfs_path = l_strdup_printf("/sys/class/%s/%s/device/net/",
 						driver_names[i], file_name);
@@ -1813,7 +1813,7 @@  char *qmi_result_get_string(struct qmi_result *result, uint8_t type)
 	if (!ptr)
 		return NULL;
 
-	return strndup(ptr, len);
+	return l_strndup(ptr, len);
 }
 
 bool qmi_result_get_uint8(struct qmi_result *result, uint8_t type,