[asterisk-commits] mjordan: branch 10 r361804 - in /branches/10: ./ main/http.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 10 14:57:33 CDT 2012


Author: mjordan
Date: Tue Apr 10 14:57:30 2012
New Revision: 361804

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=361804
Log:
Fix crash caused by unloading or reloading of res_http_post

When unlinking itself from the registered HTTP URIs, res_http_post could
inadvertently free all URIs registered with the HTTP server.  This patch
modifies the unregister method to only free the URI that is actually
being unregistered, as opposed to all of them.
........

Merged revisions 361803 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/main/http.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/main/http.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/http.c?view=diff&rev=361804&r1=361803&r2=361804
==============================================================================
--- branches/10/main/http.c (original)
+++ branches/10/main/http.c Tue Apr 10 14:57:30 2012
@@ -581,12 +581,12 @@
 	AST_RWLIST_TRAVERSE_SAFE_BEGIN(&uris, urih, entry) {
 		if (!strcmp(urih->key, key)) {
 			AST_RWLIST_REMOVE_CURRENT(entry);
-		}
-		if (urih->dmallocd) {
-			ast_free(urih->data);
-		}
-		if (urih->mallocd) {
-			ast_free(urih);
+			if (urih->dmallocd) {
+				ast_free(urih->data);
+			}
+			if (urih->mallocd) {
+				ast_free(urih);
+			}
 		}
 	}
 	AST_RWLIST_TRAVERSE_SAFE_END;




More information about the asterisk-commits mailing list