Make sure the returned sd is on the right context, and if not it's always freed.