Skip to content

Commit

Permalink
uddev: Don't leak memory when ignoring unrelated events
Browse files Browse the repository at this point in the history
  • Loading branch information
wkz committed Nov 17, 2023
1 parent eba7a81 commit aed1d8d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/uddev.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ static void uddev_ev_cb(struct ev_loop *loop, struct ev_io *ev, int revents)
sysname = udev_device_get_sysname(dev);
if (!sysname || strcmp(sysname, uddev->sysname)) {
uddev_dbg(uddev, "Ignoring unrelated event from \"%s\"", sysname);
udev_device_unref(dev);
return;
}

Expand Down

0 comments on commit aed1d8d

Please sign in to comment.