]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/install.c
shared: fix double free in unmask (#5005)
authorJan Synacek <jan.synacek@gmail.com>
Tue, 3 Jan 2017 20:34:36 +0000 (21:34 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Tue, 3 Jan 2017 20:34:36 +0000 (21:34 +0100)
commitdc7dd61de610e9330abe7014860acfa733887d5e
tree6c25753852f3328ea9e71d46049e7043031ab239
parentfa2a396620adafd861a63e0c151045b56a2151f9
shared: fix double free in unmask (#5005)

Easily reproducible:
1) systemctl mask foo
2) systemctl unmask foo foo

The problem here is that the *i that is put into todo[] is later freed
in strv_uniq(), which is not directly visible from this patch. Somewhere
further in the code, the string that *i pointed to is freed again. That
happens only when multiple services with the same name/path are specified.
src/shared/install.c