projects
/
trust_router.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fd58b52
)
Free GSS service name after a failed incoming connection
author
Jennifer Richards
<jennifer@painless-security.com>
Wed, 2 May 2018 21:24:50 +0000
(17:24 -0400)
committer
Jennifer Richards
<jennifer@painless-security.com>
Wed, 2 May 2018 21:24:50 +0000
(17:24 -0400)
tr/tr_trp.c
patch
|
blob
|
history
diff --git
a/tr/tr_trp.c
b/tr/tr_trp.c
index
f6e60c5
..
da92be4
100644
(file)
--- a/
tr/tr_trp.c
+++ b/
tr/tr_trp.c
@@
-187,10
+187,12
@@
static void tr_trps_event_cb(int listener, short event, void *arg)
name = talloc_asprintf(tmp_ctx, "trustrouter@%s", trps->hostname);
if (name == NULL)
goto cleanup;
name = talloc_asprintf(tmp_ctx, "trustrouter@%s", trps->hostname);
if (name == NULL)
goto cleanup;
- gssname=tr_new_name(name); /* name cleaned up with tmp_ctx */
+ gssname=tr_new_name(name); /* name cleaned up with tmp_ctx
but need to handl gssname ourselves
*/
- conn=trp_connection_accept(tmp_ctx, listener, gssname);
- if (conn!=NULL) {
+ conn=trp_connection_accept(tmp_ctx, listener, gssname); /* steals gssname unless it fails */
+ if (conn == NULL) {
+ tr_free_name(gssname);
+ } else {
/* need to monitor this fd and trigger events when read becomes possible */
thread_data=talloc(conn, struct trps_thread_data);
if (thread_data==NULL) {
/* need to monitor this fd and trigger events when read becomes possible */
thread_data=talloc(conn, struct trps_thread_data);
if (thread_data==NULL) {