projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04c760d
)
systemctl: add missing OOM check
author
Ronny Chevalier
<chevalier.ronny@gmail.com>
Thu, 3 Mar 2016 17:15:24 +0000
(18:15 +0100)
committer
Ronny Chevalier
<chevalier.ronny@gmail.com>
Thu, 3 Mar 2016 17:16:31 +0000
(18:16 +0100)
src/systemctl/systemctl.c
patch
|
blob
|
history
diff --git
a/src/systemctl/systemctl.c
b/src/systemctl/systemctl.c
index c741baf58a20bcda5fe0396a67763fcaab1b0ab2..a62f4bf2f5fc6bc630922e5d08671059b651e4df 100644
(file)
--- a/
src/systemctl/systemctl.c
+++ b/
src/systemctl/systemctl.c
@@
-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.
*/