xseg: Fix uninitialized return value
xseg: Deallocate dynamic memory
xseg: Support X_FLUSH operation