Skip to content

Commit 0e03903

Browse files
udev-monitor-func.c (gudev_add_filter_x): Improve
* 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.
1 parent 0fce14d commit 0e03903

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libguile-udev/udev-monitor-func.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* udev-monitor-func.c -- Udev monitor functions.
22
*
3-
* Copyright (C) 2020 Artyom V. Poptsov <[email protected]>
3+
* Copyright (C) 2020-2023 Artyom V. Poptsov <[email protected]>
44
*
55
* This file is part of Guile-Udev.
66
*
@@ -51,10 +51,10 @@ SCM_DEFINE(gudev_add_filter_x, "udev-monitor-add-filter!", 2, 1, 0,
5151
c_subsystem = scm_to_locale_string(subsystem);
5252
scm_dynwind_free(c_subsystem);
5353

54-
if (!SCM_UNBNDP(devtype))
54+
if (! SCM_UNBNDP(devtype)) {
5555
c_devtype = scm_to_locale_string(devtype);
56-
57-
scm_dynwind_free(c_devtype);
56+
scm_dynwind_free(c_devtype);
57+
}
5858

5959
result = udev_monitor_filter_add_match_subsystem_devtype(umd->udev_monitor,
6060
c_subsystem,

0 commit comments

Comments
 (0)