pal: Fix invalid buffer access for get_tags_with_module_info api

pal_get_tags_with_module_info can be called by client to query
the required size to store the module info payload. In such scenario
ensure that if payload is null it is not accessed.

Change-Id: I992992e416c9b81e56bfcc3ec15df9285fb2e3bd
2 files changed