sixlowpan: handle malloc error

The return value of malloc wasn't checked before, resulting in
possibly undefined behavior.