liblog: Fix memory leaks

If realloc returns NULL, the memory passed to it will remain allocated.
That doesn't appear to be intended here.

Caught by our static analyzer.

Bug: None
Test: Ran the static analyzer.

Change-Id: I579bee6827146d404fc6f6b86074366aefbda63f
1 file changed
tree: 6d95b18826b81aefc72f4ed2111f2971feff2a37
  1. liblog/
  2. logcat/
  3. logd/
  4. logwrapper/