scope: on unified, make sure to unwatch all PIDs once they've been moved to the cgrou... v247.1
authorFranck Bui <fbui@suse.com>
Mon, 30 Nov 2020 14:26:15 +0000 (15:26 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 1 Dec 2020 09:41:02 +0000 (10:41 +0100)
commitdc057df84c93274283cd228bc56733bc03a54195
tree5d069f6ee6b8f2a48689c3f972cc480f1a29ed8f
parent450ba44b7e4393caf97d1069575bb932baec550b
scope: on unified, make sure to unwatch all PIDs once they've been moved to the cgroup scope

Commit 428a9f6f1d0396b9eacde2b38d667cbe3f15eb55 freed u->pids which is
problematic since the references to this unit in m->watch_pids were no more
removed when the unit was freed.

This patch makes sure to clean all this refs up before freeing u->pids by
calling unit_unwatch_all_pids().

(cherry picked from commit e9eec8b5d2c106c5dd51382a155e6045c7c17c1a)
src/core/scope.c