mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -514,7 +514,7 @@ int __ao2_ref_debug(void *user_data, int delta, const char *tag, const char *fil
|
||||
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_debug(void *user_data, int delta, const char *tag, const char *fil
|
||||
|
||||
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__);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user