Before calling socket callback function, make sure the callback function exists so that we do not get NULL pointer reference. Fixes #18021 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>