Fix resource leak and simplify code for DIOCCHANGEADDR.

CID:	1007035