memory_prof: fix failure path for mem list alloc failures

We currently attempt to free the mem list if we failed to allocate
it. Only free it if allocation was successful.

Change-Id: I61d7c2d911794f9ed4e38c7c3ec84e6953de309c
1 file changed