Skip to content

Commit

Permalink
udev-monitor-func.c (gudev_add_filter_x): Improve
Browse files Browse the repository at this point in the history
* libguile-udev/udev-monitor-func.c (gudev_add_filter_x): Don't call
  'scm_dynwind_free' on the devtype string when the devtype is unbound.
  • Loading branch information
artyom-poptsov committed Dec 21, 2023
1 parent 0fce14d commit 0e03903
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libguile-udev/udev-monitor-func.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* udev-monitor-func.c -- Udev monitor functions.
*
* Copyright (C) 2020 Artyom V. Poptsov <[email protected]>
* Copyright (C) 2020-2023 Artyom V. Poptsov <[email protected]>
*
* This file is part of Guile-Udev.
*
Expand Down Expand Up @@ -51,10 +51,10 @@ SCM_DEFINE(gudev_add_filter_x, "udev-monitor-add-filter!", 2, 1, 0,
c_subsystem = scm_to_locale_string(subsystem);
scm_dynwind_free(c_subsystem);

if (!SCM_UNBNDP(devtype))
if (! SCM_UNBNDP(devtype)) {
c_devtype = scm_to_locale_string(devtype);

scm_dynwind_free(c_devtype);
scm_dynwind_free(c_devtype);
}

result = udev_monitor_filter_add_match_subsystem_devtype(umd->udev_monitor,
c_subsystem,
Expand Down

0 comments on commit 0e03903

Please sign in to comment.