]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
load-fragment: add missing oom check
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 31 May 2018 04:26:24 +0000 (13:26 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 31 May 2018 04:26:27 +0000 (13:26 +0900)
Fixes CID#1391379.

src/core/load-fragment.c

index 0bc162ad1de0c1a97eea3c9af25a82b5d157589c..bb258c4d299161f0cae4e2c115d2e36b2e7f9501 100644 (file)
@@ -811,7 +811,8 @@ int config_parse_socket_bindtodevice(
                 return 0;
         }
 
-        free_and_strdup(&s->bind_to_device, rvalue);
+        if (free_and_strdup(&s->bind_to_device, rvalue) < 0)
+                return log_oom();
 
         return 0;
 }