diff options
author | Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com> | 2014-08-19 13:36:44 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-09-08 00:38:53 +0200 |
commit | 80ed4a6da191a47225d05b6bdcf3f2788492ab03 (patch) | |
tree | 968554c9f380610dd66e06c9a85477c92d975972 | |
parent | 990e34da8f2efc7c5cd35981c7933df9049bfd33 (diff) | |
download | neardal-80ed4a6da191a47225d05b6bdcf3f2788492ab03.tar.gz neardal-80ed4a6da191a47225d05b6bdcf3f2788492ab03.tar.bz2 neardal-80ed4a6da191a47225d05b6bdcf3f2788492ab03.zip |
Add record_free().
-rw-r--r-- | lib/neardal_record.c | 15 | ||||
-rw-r--r-- | lib/neardal_record.h | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/neardal_record.c b/lib/neardal_record.c index bae8ce2..ddd4e16 100644 --- a/lib/neardal_record.c +++ b/lib/neardal_record.c @@ -26,6 +26,21 @@ #include "neardal.h" #include "neardal_prv.h" +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); +} + GVariant *neardal_record_to_g_variant(neardal_record *in) { GVariantBuilder b; diff --git a/lib/neardal_record.h b/lib/neardal_record.h index b292381..aa86ffa 100644 --- a/lib/neardal_record.h +++ b/lib/neardal_record.h @@ -36,4 +36,6 @@ void neardal_record_remove(GVariant *record); GVariant *neardal_record_to_g_variant(neardal_record *in); neardal_record *neardal_g_variant_to_record(GVariant *in); +void neardal_record_free(neardal_record *record); + #endif /* NEARDAL_RECORD_H */ |