Bug fix when there is no service in embedded devices

When a device with embedded devices (like IGD) when created and one of
the embedded devices did not have any service, there was a Segmentation
Fault (see SF Tracker [ 2688125 ]).
This commit is contained in:
Fabrice Fontaine
2010-09-30 13:51:18 +02:00
committed by Marcelo Roberto Jimenez
parent c33b11d09f
commit ab54cb3dc5
3 changed files with 33 additions and 3 deletions

View File

@@ -913,8 +913,10 @@ getServiceList( IXML_Node * node,
( *end ) = current;
return head;
} else
} else {
( *end ) = NULL;
return NULL;
}
}
@@ -960,7 +962,8 @@ getAllServiceList( IXML_Node * node,
if( head ) {
end->next =
getServiceList( currentDevice, &next_end, URLBase );
end = next_end;
if ( next_end )
end = next_end;
} else
head = getServiceList( currentDevice, &end, URLBase );