aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/radio.h1
-rw-r--r--samsung-ipc/ipc.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/include/radio.h b/include/radio.h
index 82960f8..dec8ef6 100644
--- a/include/radio.h
+++ b/include/radio.h
@@ -92,6 +92,7 @@ int ipc_client_gprs_get_iface(struct ipc_client *client, char **iface, int cid);
int ipc_client_gprs_get_capabilities(struct ipc_client *client, struct ipc_client_gprs_capabilities *cap);
int ipc_client_recv(struct ipc_client *client, struct ipc_message_info *response);
+void ipc_client_response_free(struct ipc_client *client, struct ipc_message_info *response);
/* Convenience functions for ipc_send */
void ipc_client_send(struct ipc_client *client, const unsigned short command, const char type, unsigned char *data,
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c
index ee27c4d..91dbf15 100644
--- a/samsung-ipc/ipc.c
+++ b/samsung-ipc/ipc.c
@@ -464,4 +464,12 @@ int ipc_client_recv(struct ipc_client *client, struct ipc_message_info *response
return client->ops->recv(client, response);
}
+void ipc_client_response_free(struct ipc_client *client, struct ipc_message_info *response)
+{
+ if (response->data != NULL) {
+ free(response->data);
+ response->data = NULL;
+ }
+}
+
// vim:ts=4:sw=4:expandtab