summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/device.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/device.c b/src/device.c
index 9148404..2b847a4 100644
--- a/src/device.c
+++ b/src/device.c
@@ -265,13 +265,16 @@ device_info_t device_info_new()
void device_info_free(device_info_t device_info)
{
if (device_info) {
+ if (device_info->uuid) {
+ free(device_info->uuid);
+ }
if (device_info->device_name) {
free(device_info->device_name);
- }
+ }
if (device_info->device_type) {
free(device_info->device_type);
}
- free(device_info);
+ free(device_info);
}
}
@@ -359,6 +362,8 @@ gboolean device_get_info(const char *uuid, device_info_t *device_info, GError **
*device_info = device_info_new();
}
+ (*device_info)->uuid = strdup(uuid);
+
if ((*device_info)->device_name) {
free((*device_info)->device_name);
(*device_info)->device_name = NULL;