[PATCH 0/2] Cleanups of improper use of memory allocation APIs