+ if (update_fd_array == 1) {
+ if (pollfd != NULL) {
+ free(pollfd);
+ pollfd = NULL;
+ }
+ if (local_kconsumerd_fd != NULL) {
+ free(local_kconsumerd_fd);
+ local_kconsumerd_fd = NULL;
+ }
+ /* allocate for all fds + 1 for the poll_pipe */
+ pollfd = malloc((fds_count + 1) * sizeof(struct pollfd));
+ if (pollfd == NULL) {
+ perror("pollfd malloc");
+ goto end;
+ }
+ /* allocate for all fds + 1 for the poll_pipe */
+ local_kconsumerd_fd = malloc((fds_count + 1) * sizeof(struct ltt_kconsumerd_fd));
+ if (local_kconsumerd_fd == NULL) {
+ perror("local_kconsumerd_fd malloc");
+ goto end;
+ }
+
+ ret = update_poll_array(&pollfd, local_kconsumerd_fd);