summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2013-02-15 16:25:58 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2013-02-15 16:28:10 +0100
commit1ce468457d14b2ebdb1b5be7f73dbd2fecd26982 (patch)
tree123692f33fe8d318a147729577ea0ec87d34964d /src
parent6a62cd9ac3767b9557efdcfb28cc3fdb6f58d2da (diff)
downloadneard-1ce468457d14b2ebdb1b5be7f73dbd2fecd26982.tar.gz
neard-1ce468457d14b2ebdb1b5be7f73dbd2fecd26982.tar.bz2
neard-1ce468457d14b2ebdb1b5be7f73dbd2fecd26982.zip
device: Do not open code the records freeing routine
Use near_ndef_records_free instead.
Diffstat (limited to 'src')
-rw-r--r--src/device.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/device.c b/src/device.c
index 3d52a69..29cb671 100644
--- a/src/device.c
+++ b/src/device.c
@@ -61,15 +61,10 @@ static GSList *driver_list = NULL;
static void free_device(gpointer data)
{
struct near_device *device = data;
- GList *list;
DBG("device %p", device);
- for (list = device->records; list; list = list->next) {
- struct near_ndef_record *record = list->data;
-
- __near_ndef_record_free(record);
- }
+ near_ndef_records_free(device->records);
g_list_free(device->records);
g_free(device->path);