Merge pull request #2790 from ronnychevalier/rc/systemctl_missing_oom_check

systemctl: add missing OOM check
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2016-03-03 12:32:12 -05:00
commit 9f0cd100d0

View file

@ -6167,7 +6167,12 @@ end:
/* Removing empty dropin dirs */
if (!arg_full) {
_cleanup_free_ char *dir = dirname_malloc(*original);
_cleanup_free_ char *dir;
dir = dirname_malloc(*original);
if (!dir)
return log_oom();
/* no need to check if the dir is empty, rmdir
* does nothing if it is not the case.
*/