- /* We keep a *copy* of this fd, because our caller will close it to indicate
- * EOF */
- elt->input_fd = dup(fd);
+ /* We keep a *copy* of this fd, because our caller will close it to
+ * indicate EOF */
+ g_assert(xfer_element_swap_input_fd(elt, dup(fd)) == -1);