From: Richard Mudgett Date: Fri, 28 Sep 2018 18:55:43 +0000 (-0500) Subject: app_queue.c: Fix json ref leak X-Git-Tag: 13.24.0-rc1~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec52409a530d9cdbee2e6524d460ab8b27f25d24;p=thirdparty%2Fasterisk.git app_queue.c: Fix json ref leak 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 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 50f90295b7..eb85c51b0e 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -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; }