]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-event: fix use of uninitialized variable
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 23 Feb 2023 02:03:17 +0000 (11:03 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 23 Feb 2023 02:05:49 +0000 (11:05 +0900)
Follow-up for 158fe190afe37b222c9dc2c53bd7be426b92ef89.

Fixes CID#1505670.

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

index 5303a14cd69f94550c060cbf6e75498f91f47964..403127d66942f91e683cabadba9a65a05d48597e 100644 (file)
@@ -1917,7 +1917,7 @@ _public_ int sd_event_add_memory_pressure(
         _cleanup_(source_freep) sd_event_source *s = NULL;
         _cleanup_close_ int path_fd = -1, fd = -1;
         _cleanup_free_ void *write_buffer = NULL;
-        const char *watch, *watch_fallback, *env;
+        const char *watch, *watch_fallback = NULL, *env;
         size_t write_buffer_size = 0;
         struct stat st;
         uint32_t events;