diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-11-16 18:19:22 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-11-16 18:19:22 +0000 |
commit | 25b3424c164f7e45b74e015e4f7053c3816dad78 (patch) | |
tree | 9d6441cd3953401447fe136ae07ade4eb250356e /src/conversation | |
parent | f2a84f47cbb540141c4cc049eb573bd160d43473 (diff) | |
download | gnunet-25b3424c164f7e45b74e015e4f7053c3816dad78.tar.gz gnunet-25b3424c164f7e45b74e015e4f7053c3816dad78.zip |
-avoid use after free
Diffstat (limited to 'src/conversation')
-rw-r--r-- | src/conversation/gnunet-service-conversation.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c index 36e8d5060..900de3275 100644 --- a/src/conversation/gnunet-service-conversation.c +++ b/src/conversation/gnunet-service-conversation.c | |||
@@ -968,6 +968,7 @@ handle_mesh_hangup_message (void *cls, | |||
968 | struct Channel *ch = *channel_ctx; | 968 | struct Channel *ch = *channel_ctx; |
969 | struct Line *line; | 969 | struct Line *line; |
970 | struct ClientPhoneHangupMessage hup; | 970 | struct ClientPhoneHangupMessage hup; |
971 | enum ChannelStatus status; | ||
971 | 972 | ||
972 | if (NULL == ch) | 973 | if (NULL == ch) |
973 | { | 974 | { |
@@ -980,8 +981,9 @@ handle_mesh_hangup_message (void *cls, | |||
980 | hup.header.size = sizeof (hup); | 981 | hup.header.size = sizeof (hup); |
981 | hup.header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP); | 982 | hup.header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP); |
982 | hup.cid = ch->cid; | 983 | hup.cid = ch->cid; |
984 | status = ch->status; | ||
983 | destroy_line_mesh_channels (ch); | 985 | destroy_line_mesh_channels (ch); |
984 | switch (ch->status) | 986 | switch (status) |
985 | { | 987 | { |
986 | case CS_CALLEE_RINGING: | 988 | case CS_CALLEE_RINGING: |
987 | case CS_CALLEE_CONNECTED: | 989 | case CS_CALLEE_CONNECTED: |