]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't attempt free of NULL ptr in pbx.c handle_presencechange
authorJonathan Rose <jrose@digium.com>
Tue, 24 Jul 2012 20:57:34 +0000 (20:57 +0000)
committerJonathan Rose <jrose@digium.com>
Tue, 24 Jul 2012 20:57:34 +0000 (20:57 +0000)
(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

main/pbx.c

index 9e3f5325be02328de1363c43317c7d70d4383430..82e848452c760f867b11b435b14e1c7b86ddd5b3 100644 (file)
@@ -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;