]> 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)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Thu, 11 Sep 2025 15:24:08 +0000 (15:24 +0000)
ast_presence_state allocates subtype and message. We straightforwardly
need to clean those up.

main/manager.c

index 3d24e33cba69383ca1e380a9094bf43a80a1b9c2..d4fea174ddf47ba9fc8ebb067a04f948b8e2db45 100644 (file)
@@ -5524,6 +5524,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;
 }