diff options
author | Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com> | 2014-08-19 13:36:49 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-09-08 00:38:53 +0200 |
commit | 83742b781bef8cc160c2b1d055c7924c828d59e8 (patch) | |
tree | 40186c48b25b09a40296d1e5ad586be6d2802ae7 | |
parent | d848a27255820920b7a1da45d276b91f82f60200 (diff) | |
download | neardal-83742b781bef8cc160c2b1d055c7924c828d59e8.tar.gz neardal-83742b781bef8cc160c2b1d055c7924c828d59e8.tar.bz2 neardal-83742b781bef8cc160c2b1d055c7924c828d59e8.zip |
Minor optimization of neardal_record_free().
-rw-r--r-- | lib/neardal_record.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/neardal_record.c b/lib/neardal_record.c index ddd4e16..7a1dff2 100644 --- a/lib/neardal_record.c +++ b/lib/neardal_record.c @@ -28,17 +28,9 @@ void neardal_record_free(neardal_record *r) { - g_free(r->action); - g_free(r->carrier); - g_free(r->encoding); - g_free(r->language); - g_free(r->mime); - g_free(r->name); - g_free(r->representation); - g_free(r->type); - g_free(r->uri); - - g_free(r); + /* let's use uri as sentinel for g_strfreev() */ + g_clear_pointer(&r->uri, g_free); + g_strfreev((char **) r); } GVariant *neardal_record_to_g_variant(neardal_record *in) |