dinput: Guard against the case where malloc fails
Merge pull request #977 from lioncash/deref

dinput: Guard against the case where malloc fails