]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: mgmt_msg: fix a valgrind memleak
authorChristian Hopps <chopps@labn.net>
Mon, 30 Oct 2023 07:30:05 +0000 (03:30 -0400)
committerChristian Hopps <chopps@labn.net>
Mon, 30 Oct 2023 08:03:12 +0000 (04:03 -0400)
- Free the outbound stream on destroy.

Signed-off-by: Christian Hopps <chopps@labn.net>
lib/mgmt_msg.c

index 70332bd5f3deea1b1c7bc178a96d61ef93543333..12432a06e2cad6cf4dabd086005dd0dc0a45a011 100644 (file)
@@ -427,6 +427,8 @@ void mgmt_msg_destroy(struct mgmt_msg_state *ms)
        mgmt_msg_reset_writes(ms);
        if (ms->ins)
                stream_free(ms->ins);
+       if (ms->outs)
+               stream_free(ms->outs);
        free(ms->idtag);
 }