From: Jonathan Rose Date: Tue, 24 Jul 2012 20:57:34 +0000 (+0000) Subject: Don't attempt free of NULL ptr in pbx.c handle_presencechange X-Git-Tag: certified/1.8.11-cert6~3^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=699e4638637d936914936cf8e2804ba87d82fbb2;p=thirdparty%2Fasterisk.git Don't attempt free of NULL ptr in pbx.c handle_presencechange (closes issue AST-921) Reported by: Guenther Kelleter Patches: nullptr.patch uploaded by Guenther Kelleter (license 6372) git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/1.8.11@370464 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/pbx.c b/main/pbx.c index 9e3f5325be..82e848452c 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -4644,7 +4644,7 @@ static int handle_presencechange(void *datap) res = 0; presencechange_cleanup: - ast_free(hint_app); + ast_ref(hint_app, -1); ao2_ref(pc, -1); return res;