diff options
author | Simon Busch <morphis@gravedo.de> | 2012-08-24 15:57:03 +0200 |
---|---|---|
committer | Simon Busch <morphis@gravedo.de> | 2012-08-24 15:57:03 +0200 |
commit | d851f2bceb5813ba128ab31384bbec7f8cc72f07 (patch) | |
tree | 132f94e665e3450f7d7cfe11922ee8b7666c071d | |
parent | 118643a96dbaa46dbb44dc2d3d5d33a520fe9033 (diff) | |
download | external_libsamsung-ipc-d851f2bceb5813ba128ab31384bbec7f8cc72f07.zip external_libsamsung-ipc-d851f2bceb5813ba128ab31384bbec7f8cc72f07.tar.gz external_libsamsung-ipc-d851f2bceb5813ba128ab31384bbec7f8cc72f07.tar.bz2 |
Add another method to free space used by a response message
-rw-r--r-- | include/radio.h | 1 | ||||
-rw-r--r-- | samsung-ipc/ipc.c | 8 |
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 |