]> 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)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Mon, 30 Oct 2023 20:54:54 +0000 (20:54 +0000)
- Free the outbound stream on destroy.

Signed-off-by: Christian Hopps <chopps@labn.net>
(cherry picked from commit 49a09ca2b1f8e3e840716bd1978e820dbe9762ea)

lib/mgmt_msg.c

index ee5c1008bd0c8431c1f1d479ed1e61c2979d8373..1cd3240ece75f6e0d938191c98518d1eb1bebdb8 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);
 }