summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-12-19 23:23:20 +0100
committerGravatar Martin Szulecki2010-12-19 23:23:20 +0100
commit479e1e0bbbd33d050e844d3c2e105d1bbd652710 (patch)
tree7e0fdbc2f5d746c7b4d85a7934391d90ec10623f
parente8f195777fa62a22afb1196fe9e48059c594575c (diff)
downloadsbmanager-479e1e0bbbd33d050e844d3c2e105d1bbd652710.tar.gz
sbmanager-479e1e0bbbd33d050e844d3c2e105d1bbd652710.tar.bz2
Also set uuid in device_get_info()
-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;