Fix Coverity Scan CID 60369 (Variable plain_msg going out of scope leaks the storage it points to.)

This commit is contained in:
Dong Anyuan
2019-06-20 12:36:02 +09:00
parent d7f9a3578d
commit 42f481b51e
+1
View File
@@ -437,6 +437,7 @@ static int _emm_as_data_ind(nas_user_t *user, const emm_as_data_t *msg, int *emm
if (bytes < 0) {
/* Failed to decrypt the message */
*emm_cause = EMM_CAUSE_PROTOCOL_ERROR;
free(plain_msg);
LOG_FUNC_RETURN (bytes);
} else if (header.protocol_discriminator ==
EPS_MOBILITY_MANAGEMENT_MESSAGE) {