diff options
| author | Vaxry <vaxry@vaxry.net> | 2026-01-05 15:05:25 +0100 |
|---|---|---|
| committer | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-01-05 18:53:29 +0100 |
| commit | 32978176b1eb5de0455db85b3ef7d0eb6c85dda4 (patch) | |
| tree | 61d3f871c22d66a8e7523f3445b3409b3c5577c9 /src/helpers/SdDaemon.cpp | |
| parent | 1761909bca532b854922536c644063e140cf44c2 (diff) | |
systemd/sdDaemon: initialize sockaddr_un
Diffstat (limited to 'src/helpers/SdDaemon.cpp')
| -rw-r--r-- | src/helpers/SdDaemon.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helpers/SdDaemon.cpp b/src/helpers/SdDaemon.cpp index d914eecf..c3008807 100644 --- a/src/helpers/SdDaemon.cpp +++ b/src/helpers/SdDaemon.cpp @@ -41,7 +41,7 @@ int NSystemd::sdNotify(int unsetEnvironment, const char* state) { // address length must be at most this; see man 7 unix size_t addrLen = strnlen(addr, 107); - struct sockaddr_un unixAddr; + struct sockaddr_un unixAddr = {0}; unixAddr.sun_family = AF_UNIX; strncpy(unixAddr.sun_path, addr, addrLen); if (unixAddr.sun_path[0] == '@') |
