xfsprogs: libxcmd: don't clobber fs_table on realloc()
In fs_table_insert(), realloc() is called to resize the global
fs_table. If it fails, it overwrites a previously valid fs_table
pointer with NULL.
Instead, assign the return value to a local temporary and overwrite
fs_table only if the realloc() call succeeds. The only defined
errno value for a realloc() failure is ENOMEM, so return that
explicitly in the event it fails.
Signed-off-by: Alex Elder <aelder@sgi.com> Reviewed-by: Christoph Hellwig <hch@lst.de>