Free the old uuid before overwriting it with an error message. Also
strdup() the error message since the error object gets freed just after
this code.
Signed-off-by: Russell Bryant <rbryant(a)redhat.com>
---
src/lib/host_linux.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/lib/host_linux.c b/src/lib/host_linux.c
index fd748c1..fa4d41c 100644
--- a/src/lib/host_linux.c
+++ b/src/lib/host_linux.c
@@ -274,7 +274,8 @@ char *host_os_reboot_uuid(void)
if(g_file_set_contents(file, uuid, strlen(uuid), &error) == FALSE) {
mh_info("%s", error->message);
- uuid = error->message;
+ free(uuid);
+ uuid = strdup(error->message);
}
if(error) {
--
1.7.6
Show replies by date
This lists network interfaces, not IP addresses.
Signed-off-by: Russell Bryant <rbryant(a)redhat.com>
---
src/network/schema.xml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/network/schema.xml b/src/network/schema.xml
index a718cfe..2458bfa 100644
--- a/src/network/schema.xml
+++ b/src/network/schema.xml
@@ -6,7 +6,7 @@
<statistic name="qmf-gen-no-crash" type="absTime"
desc="Dummy stat to stop qmf-gen from crashing." />
- <method name="list" desc="List IP addresses">
+ <method name="list" desc="List network
interfaces">
<arg name="iface_map" dir="O" type="list"
/>
</method>
<method name="start" desc="Start a network
interface">
--
1.7.6