summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f6bb13a)
Only set source for freshly created .mounts coming from
mountinfo file.
int r;
Unit *u;
bool delete;
int r;
Unit *u;
bool delete;
- char *e, *w = NULL, *o = NULL, *s = NULL, *f = NULL;
+ char *e, *w = NULL, *o = NULL, *f = NULL;
MountParameters *p;
bool load_extras = false;
MountParameters *p;
bool load_extras = false;
+ u->source_path = strdup("/proc/self/mountinfo");
+ if (!u->source_path) {
+ r = -ENOMEM;
+ goto fail;
+ }
+
unit_add_to_load_queue(u);
} else {
delete = false;
unit_add_to_load_queue(u);
} else {
delete = false;
if (!(w = strdup(what)) ||
!(o = strdup(options)) ||
if (!(w = strdup(what)) ||
!(o = strdup(options)) ||
- !(s = strdup("/proc/self/mountinfo")) ||
!(f = strdup(fstype))) {
r = -ENOMEM;
goto fail;
!(f = strdup(fstype))) {
r = -ENOMEM;
goto fail;
}
MOUNT(u)->from_proc_self_mountinfo = true;
}
MOUNT(u)->from_proc_self_mountinfo = true;
- free(u->source_path);
- u->source_path = s;
free(p->what);
p->what = w;
free(p->what);
p->what = w;
free(f);
if (delete && u)
free(f);
if (delete && u)