idiag: fix memory leak in idiagnl_msg_set_cong()
Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
0e13bb44b8
commit
f40fd71701
1 changed files with 1 additions and 0 deletions
|
@ -324,6 +324,7 @@ char *idiagnl_msg_get_cong(const struct idiagnl_msg *msg)
|
|||
|
||||
void idiagnl_msg_set_cong(struct idiagnl_msg *msg, char *cong)
|
||||
{
|
||||
free (msg->idiag_cong);
|
||||
msg->idiag_cong = strdup(cong);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue