]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
manager.c: Fix presencestate object leak
authorNathan Monfils <nathanmonfils@gmail.com>
Mon, 8 Sep 2025 15:56:02 +0000 (17:56 +0200)
committerNathan Monfils <nathanmonfils@gmail.com>
Thu, 11 Sep 2025 15:24:00 +0000 (15:24 +0000)
ast_presence_state allocates subtype and message. We straightforwardly
need to clean those up.

main/manager.c

index 4154d2b1705031eaed920e646b150100b17ae104..baf2521a4b1b70b1e794ca32e01fbcd5ac970116 100644 (file)
@@ -5528,6 +5528,9 @@ static int action_presencestate(struct mansession *s, const struct message *m)
        }
        astman_append(s, "\r\n");
 
+       ast_free(subtype);
+       ast_free(message);
+
        return 0;
 }