Fix memory leak in apnsettings

Change-Id: Iea353b71bd6e39f4341eea6043462e41e10eb944