Add missing guards around exit label

Signed-off-by: David Horstmann <david.horstmann@arm.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 19daee9..5c1a98d 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -5501,7 +5501,9 @@
 
     status = psa_generate_random_internal(output, output_size);
 
+#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
 exit:
+#endif
     LOCAL_OUTPUT_FREE(output_external, output);
     return status;
 }