[PATCH 6.1 139/292] recordmcount: Fix memory leaks in the uwrite function