[PATCH] netconfig: fix freeing invalid pointer