control_socket: fixed a leak

fixes CID 417382
This commit is contained in:
Martin Pulec
2023-10-04 08:25:21 +02:00
parent 87e0c61416
commit 297661cd2a

View File

@@ -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");
}
@@ -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");
}