diff --git a/src/topology-xml.c b/src/topology-xml.c
index 220afd1..35fb19e 100644
--- a/src/topology-xml.c
+++ b/src/topology-xml.c
@@ -612,7 +612,7 @@ hwloc__xml_import_userdata(hwloc_topology_t topology __hwloc_attribute_unused, h
       return -1;
 
   } else if (topology->userdata_not_decoded) {
-      char *buffer, *fakename;
+      char *buffer = "", *fakename;
       size_t reallength = encoded ? BASE64_ENCODED_LENGTH(length) : length;
       ret = state->global->get_content(state, &buffer, reallength);
       if (ret < 0)
