]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-event: drop redundant code
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 15 Jul 2022 15:38:30 +0000 (00:38 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 15 Jul 2022 15:38:37 +0000 (00:38 +0900)
The function `source_io_unregister()` will be anyway called in
`source_disconnect()`.

src/libsystemd/sd-event/sd-event.c

index df48b3ce0466d9a80d0d9ae05c08f690801ddb38..bdede44df3b120e134bc0398c12ce9cf36fbe58b 100644 (file)
@@ -2139,12 +2139,9 @@ static sd_event_source* event_source_free(sd_event_source *s) {
          * we still retain a valid event source object after
          * the callback. */
 
-        if (s->dispatching) {
-                if (s->type == SOURCE_IO)
-                        source_io_unregister(s);
-
+        if (s->dispatching)
                 source_disconnect(s);
-        else
+        else
                 source_free(s);
 
         return NULL;