From: Yu Watanabe Date: Thu, 23 Feb 2023 02:03:17 +0000 (+0900) Subject: sd-event: fix use of uninitialized variable X-Git-Tag: v254-rc1~1181^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=40c5d5d2a10de273f0b37fc9e76a0138f190685e;p=thirdparty%2Fsystemd.git sd-event: fix use of uninitialized variable Follow-up for 158fe190afe37b222c9dc2c53bd7be426b92ef89. Fixes CID#1505670. --- diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 5303a14cd69..403127d6694 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -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;