]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_queue.c: Fix json ref leak
authorRichard Mudgett <rmudgett@digium.com>
Fri, 28 Sep 2018 18:55:43 +0000 (13:55 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 1 Oct 2018 16:45:52 +0000 (11:45 -0500)
Declining the queue_member_status_type stasis message in stasis.conf
causes these messages to leak json objects.

* Add missing ast_json_unref() if the type is NULL in
queue_publish_member_blob().

ASTERISK-28084

Change-Id: I691ecf49bd1f7d9c29182e1eee8c4bb7103be9fc

apps/app_queue.c

index 50f90295b7d2b5d68c0ee8d203ba78e312f69d84..eb85c51b0e75b49a3108b09ac52a52011bb0ccd4 100644 (file)
@@ -2154,6 +2154,7 @@ static void queue_publish_member_blob(struct stasis_message_type *type, struct a
        RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
 
        if (!blob || !type) {
+               ast_json_unref(blob);
                return;
        }