diff options
author | Martin Szulecki | 2010-12-19 23:23:20 +0100 |
---|---|---|
committer | Martin Szulecki | 2010-12-19 23:23:20 +0100 |
commit | 479e1e0bbbd33d050e844d3c2e105d1bbd652710 (patch) | |
tree | 7e0fdbc2f5d746c7b4d85a7934391d90ec10623f /src/device.c | |
parent | e8f195777fa62a22afb1196fe9e48059c594575c (diff) | |
download | sbmanager-479e1e0bbbd33d050e844d3c2e105d1bbd652710.tar.gz sbmanager-479e1e0bbbd33d050e844d3c2e105d1bbd652710.tar.bz2 |
Also set uuid in device_get_info()
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 9 |
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; |