aboutsummaryrefslogtreecommitdiff
path: root/modules/devices/devicetree/pmac_data.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/devices/devicetree/pmac_data.c')
-rw-r--r--modules/devices/devicetree/pmac_data.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/devices/devicetree/pmac_data.c b/modules/devices/devicetree/pmac_data.c
index 41d3a105..01b08419 100644
--- a/modules/devices/devicetree/pmac_data.c
+++ b/modules/devices/devicetree/pmac_data.c
@@ -38,6 +38,10 @@ static gchar *ppc_mac_details(void) {
return NULL;
while (fgets(buffer, 128, cpuinfo)) {
gchar **tmp = g_strsplit(buffer, ":", 2);
+ if (tmp[1] == NULL) {
+ g_strfreev(tmp);
+ continue;
+ }
tmp[0] = g_strstrip(tmp[0]);
tmp[1] = g_strstrip(tmp[1]);
get_str("platform", platform);