Changes for new NOOBS multi partition booting from gsh
SW-11786: Fix USE_AFTER_FREE defect (61220)

In the error paths of parse_open, only unlock the service if it is not
NULL. In the fail path, NULL the service after it is unlocked to
prevent a double unlock.