[gnome-network-displays/cc-tmp: 65/80] cc: move g_clear_pointer to the caller function
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-network-displays/cc-tmp: 65/80] cc: move g_clear_pointer to the caller function
- Date: Fri, 9 Sep 2022 12:03:51 +0000 (UTC)
commit 9e2366788af80af6d6f3330ffac1e1c928cf9a46
Author: Anupam Kumar <kyteinsky gmail com>
Date: Tue Sep 6 02:46:21 2022 +0530
cc: move g_clear_pointer to the caller function
src/cc/cc-comm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/cc/cc-comm.c b/src/cc/cc-comm.c
index b592d03..dc741da 100644
--- a/src/cc/cc-comm.c
+++ b/src/cc/cc-comm.c
@@ -60,8 +60,6 @@ cc_comm_parse_received_data (CcComm *comm, uint8_t * input_buffer, gssize input_
return;
}
- g_clear_pointer (&comm->message_buffer, g_free);
-
comm->closure->message_received_cb (comm->closure->userdata, message);
cast__channel__cast_message__free_unpacked (message, NULL);
@@ -143,6 +141,8 @@ cc_comm_message_read_cb (GObject *source_object,
cc_comm_dump_message ("Received message bytes:", comm->message_buffer, io_bytes);
cc_comm_parse_received_data (comm, comm->message_buffer, io_bytes);
+ g_clear_pointer (&comm->message_buffer, g_free);
+
cc_comm_read_header (comm);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]