Skip to content

Commit

Permalink
control_socket: fixed a leak
Browse files Browse the repository at this point in the history
fixes CID 417382
  • Loading branch information
MartinPulec committed Oct 4, 2023
1 parent 87e0c61 commit 297661c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/control_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ process_audio_message(struct module *root_module, const char *cmd)
} else if (prefix_matches(cmd, "unmute-")) {
msg->type = RECEIVER_MSG_UNMUTE;
} else {
free_message((struct message *) msg, nullptr);
return new_response(RESPONSE_BAD_REQUEST,
"malformed audio recv mute msg");
}
Expand All @@ -334,6 +335,7 @@ process_audio_message(struct module *root_module, const char *cmd)
} else if (prefix_matches(cmd, "unmute-")) {
msg->type = SENDER_MSG_UNMUTE;
} else {
free_message((struct message *) msg, nullptr);
return new_response(RESPONSE_BAD_REQUEST,
"malformed audio send mute msg");
}
Expand Down

0 comments on commit 297661c

Please sign in to comment.