oc_server_api: fix NULL ptr deref

Signed-off-by: Kishen Maloor <kishen.maloor@intel.com>
4 jobs for master in 12 minutes and 30 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #3302
Android_build

00:12:30

passed #3303
doxygen

00:01:10

passed #3300
Linux_Secured_Test

00:04:50

passed #3301
Linux_Unsecured_Test

00:03:50