Fix clang static analyzer on potential memory leaks.

Rationale:
First was not really a leak, but the combination of stack/heap
allocated data structures with a single re-allocation was a bit
complex for static analysis. Second was a true leak.

BUG=30040701

Change-Id: I10c2095f3061bd2ad49f24f7c25fcd7ca0f95111
1 file changed