]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: initialize tz to null 1074/head
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sun, 30 Aug 2015 01:19:25 +0000 (03:19 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sun, 30 Aug 2015 01:23:07 +0000 (03:23 +0200)
We may not set it before checking it for null.

src/network/networkd-link.c

index ff693ed0fdb2536ab9aa9128d0bb33ee3b759700..d797a8ded8d174a5a3549217035693c4e582c748 100644 (file)
@@ -823,7 +823,7 @@ static int link_enter_set_addresses(Link *link) {
 
                 if (link->network->dhcp_server_emit_timezone) {
                         _cleanup_free_ char *buffer = NULL;
-                        const char *tz;
+                        const char *tz = NULL;
 
                         if (link->network->dhcp_server_timezone)
                                 tz = link->network->dhcp_server_timezone;