core: Fix memory leak when JSON parsing fails
core: Fix memory leak when JSON parsing fails

This patch fixes potential memory leak when 'credential' JSON data
parsing fails.

CESARBR/knot-service-source,CESARBR/knot-service-source,CESARBR/knot-service-source,CESARBR/knot-service-source,CESARBR/knot-service-source