projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b03ec00
)
core: minor error handling fix in mount_setup_new_unit()
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Fri, 20 Jan 2017 00:45:58 +0000
(09:45 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 23 Jan 2017 04:59:21 +0000
(13:59 +0900)
The function mount_setup_new_unit() should return -ENOMEM
if at least one of `strdup` calls are failed.
src/core/mount.c
patch
|
blob
|
history
diff --git
a/src/core/mount.c
b/src/core/mount.c
index
8192a36
..
fb08022
100644
(file)
--- a/
src/core/mount.c
+++ b/
src/core/mount.c
@@
-1408,7
+1408,7
@@
static int mount_setup_new_unit(
u->source_path = strdup("/proc/self/mountinfo");
MOUNT(u)->where = strdup(where);
- if (!u->source_path
&&
!MOUNT(u)->where)
+ if (!u->source_path
||
!MOUNT(u)->where)
return -ENOMEM;
/* Make sure to initialize those fields before mount_is_extrinsic(). */