teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
Blob Blame History Raw
From f9b89affee12bf7383cf2210798489c7197c5765 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 27 Jan 2017 00:45:38 -0500
Subject: [PATCH] nspawn: fix clobbering of selinux context arg

First bug fixed by gcc 7. Yikes.

(cherry picked from commit 2e8977b198882fb8c99366ab2944572aa8998dc0)
---
 src/nspawn/nspawn.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 503265545b..0e2f4d59a5 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -658,9 +658,8 @@ static int parse_argv(int argc, char *argv[]) {
                                 r = free_and_strdup(&arg_machine, optarg);
                                 if (r < 0)
                                         return log_oom();
-
-                                break;
                         }
+                        break;
 
                 case 'Z':
                         arg_selinux_context = optarg;
-- 
2.9.3