chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
selinux: fix potential double free crash in child process
[elogind.git]
/
src
/
shared
/
label.c
diff --git
a/src/shared/label.c
b/src/shared/label.c
index b6af38d82d39a0940c6133c4ca886d7384c59cdb..69d4616183b3bf4dcdb04e5bfde8a137384bd35f 100644
(file)
--- 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: