diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-30 19:34:47 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-30 19:34:47 +0000 |
commit | 7cfa10f05b13911f3595a3db8b058ee587dfd8d5 (patch) | |
tree | 7a9b4cd5fcd7c6762668e03902ccc2b5f07e8343 /main/config.c | |
parent | 2393a4999d3cee78abaec1ff3244bd320d59fb97 (diff) |
Merged revisions 90348 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r90348 | russell | 2007-11-30 13:26:04 -0600 (Fri, 30 Nov 2007) | 8 lines
Change the behavior of ao2_link(). Previously, in inherited a reference.
Now, it automatically increases the reference count to reflect the reference
that is now held by the container.
This was done to be more consistent with ao2_unlink(), which automatically
releases the reference held by the container. It also makes it so it is
no longer possible for a pointer to be invalid after ao2_link() returns.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90351 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/config.c')
-rw-r--r-- | main/config.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/main/config.c b/main/config.c index fc020c1b7..fe1e446c0 100644 --- a/main/config.c +++ b/main/config.c @@ -1431,7 +1431,6 @@ static void set_fn(char *fn, int fn_size, const char *file, const char *configfi fx->lineno = 1; *fi = fx; ao2_link(fileset, fx); - ao2_ref(fx,1); /* bump the ref count, so it looks like we just got the ref from find */ } } |