Skip to content

Commit

Permalink
udpsink: set fd to -1 if URI is NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
funman authored and cmassiot committed Nov 10, 2024
1 parent 5e83855 commit 18904c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/upipe-modules/upipe_udp_sink.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ static int _upipe_udpsink_set_uri(struct upipe *upipe, const char *uri)
if (unlikely(upipe_udpsink->fd != -1)) {
if (likely(upipe_udpsink->uri != NULL))
upipe_notice_va(upipe, "closing socket %s", upipe_udpsink->uri);
close(upipe_udpsink->fd);
ubase_clean_fd(&upipe_udpsink->fd);
}
ubase_clean_str(&upipe_udpsink->uri);
upipe_udpsink_set_upump(upipe, NULL);
Expand Down

0 comments on commit 18904c4

Please sign in to comment.