summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/label.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/label.c b/src/shared/label.c
index b6af38d82d..69d4616183 100644
--- a/src/shared/label.c
+++ b/src/shared/label.c
@@ -334,7 +334,7 @@ int label_get_child_mls_label(int socket_fd, const char *exe, char **label) {
}
freecon(mycon);
- mycon = context_str(bcon);
+ mycon = strdup(context_str(bcon));
if (!mycon) {
r = -errno;
goto out;
@@ -348,6 +348,7 @@ int label_get_child_mls_label(int socket_fd, const char *exe, char **label) {
}
*label = ret;
+ ret = NULL;
r = 0;
out: