diff options
author | Martin Szulecki | 2010-12-19 23:23:20 +0100 |
---|---|---|
committer | Martin Szulecki | 2012-03-18 18:56:09 +0100 |
commit | 60008d3cc6e3c19298a43bc89125efc7f11959a0 (patch) | |
tree | f46abb2dd6595b388931b9f9f881137f43f0aca8 | |
parent | ffc00912969bdc1467ba67e6e4322aadd6a4c317 (diff) | |
download | sbmanager-60008d3cc6e3c19298a43bc89125efc7f11959a0.tar.gz sbmanager-60008d3cc6e3c19298a43bc89125efc7f11959a0.tar.bz2 |
Also set uuid in device_get_info()
-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; |