Don't try release network in non-private modes

Fixes #9594

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Merge pull request #9599 from LK4D4/no_release_non_own

Don't try release network in non-private modes