[asterisk-commits] mjordan: branch 12 r404531 - /branches/12/res/res_pjsip/pjsip_cli.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 20 21:34:04 CST 2013


Author: mjordan
Date: Fri Dec 20 21:34:00 2013
New Revision: 404531

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=404531
Log:
res_pjsip/pjsip_cli: fix compilation error caused by passing ast_free

When wanting to pass *free as a function pointer, ast_free_ptr has to be used
instead of ast_free. This allows it to be compiled with MALLOC_DEBUG enabled.


Modified:
    branches/12/res/res_pjsip/pjsip_cli.c

Modified: branches/12/res/res_pjsip/pjsip_cli.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip/pjsip_cli.c?view=diff&rev=404531&r1=404530&r2=404531
==============================================================================
--- branches/12/res/res_pjsip/pjsip_cli.c (original)
+++ branches/12/res/res_pjsip/pjsip_cli.c Fri Dec 20 21:34:00 2013
@@ -20,6 +20,7 @@
 
 #include <pjsip.h>
 #include <pjsip_ua.h>
+
 #include "asterisk/res_pjsip.h"
 #include "include/res_pjsip_private.h"
 #include "asterisk/res_pjsip_cli.h"
@@ -303,7 +304,7 @@
 
 	if (ast_cli_register_multiple(cli_commands, ARRAY_LEN(cli_commands))) {
 		ast_log(LOG_ERROR, "Failed to register pjsip cli commands.\n");
-		ast_hashtab_destroy(formatter_registry, ast_free);
+		ast_hashtab_destroy(formatter_registry, ast_free_ptr);
 		return -1;
 	}
 	sip_sorcery = sorcery;
@@ -314,6 +315,6 @@
 {
 	ast_cli_unregister_multiple(cli_commands, ARRAY_LEN(cli_commands));
 	if (formatter_registry) {
-		ast_hashtab_destroy(formatter_registry, ast_free);
-	}
-}
+		ast_hashtab_destroy(formatter_registry, ast_free_ptr);
+	}
+}




More information about the asterisk-commits mailing list