[asterisk-commits] rmudgett: trunk r364910 - in /trunk: ./ main/astobj2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 1 18:21:11 CDT 2012


Author: rmudgett
Date: Tue May  1 18:21:07 2012
New Revision: 364910

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=364910
Log:
Fixed __ao2_ref() validating user_data twice.

(closes issue ASTERISK-19755)
Reported by: Gunther Kelleter
Patches:
      ao2_ref.patch (license #6372) patch uploaded by Gunther Kelleter
........

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

Merged revisions 364903 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    trunk/   (props changed)
    trunk/main/astobj2.c

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

Modified: trunk/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/astobj2.c?view=diff&rev=364910&r1=364909&r2=364910
==============================================================================
--- trunk/main/astobj2.c (original)
+++ trunk/main/astobj2.c Tue May  1 18:21:07 2012
@@ -514,7 +514,7 @@
 		FILE *refo = fopen(REF_FILE, "a");
 		if (refo) {
 			fprintf(refo, "%p %s%d   %s:%d:%s (%s) [@%d]\n", user_data, (delta < 0 ? "" : "+"),
-				delta, file, line, func, tag, obj ? obj->priv_data.ref_counter : -1);
+				delta, file, line, func, tag, obj->priv_data.ref_counter);
 			fclose(refo);
 		}
 	}
@@ -530,11 +530,6 @@
 
 int __ao2_ref(void *user_data, int delta)
 {
-	struct astobj2 *obj = INTERNAL_OBJ(user_data);
-
-	if (obj == NULL)
-		return -1;
-
 	return internal_ao2_ref(user_data, delta, __FILE__, __LINE__, __FUNCTION__);
 }
 




More information about the asterisk-commits mailing list