loader: file_addmetadata() should check for memory allocation
malloc() can return NULL.
MFC after: 1w