Fix double freeing of memory in SAP service and add null-checks.

The payload of a SAP request could be freed twice in certain scenarios.
Also, add null-checks to prevent dereferencing of null pointers.

Bug: 64729356
Test: Manually run the fuzz tests and ensure that there is no crash in
      rild

Change-Id: Ib7ae269fa5297d6acea267337b220b8858c82bae
2 files changed
tree: 847611370ab2f7e110ffe532f7fcaf4c469c7df1
  1. include/
  2. libril/
  3. librilutils/
  4. reference-ril/
  5. rild/
  6. CleanSpec.mk
  7. OWNERS