SGW: Initialise user variable to NULL to avoid potential mis-free on error conditions