projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7a5fb5
)
RTP documentation states that you can pass NULL as the module, so make sure that...
author
Tilghman Lesher
<tilghman@meg.abyt.es>
Wed, 17 Feb 2010 07:01:13 +0000
(07:01 +0000)
committer
Tilghman Lesher
<tilghman@meg.abyt.es>
Wed, 17 Feb 2010 07:01:13 +0000
(07:01 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247125
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
main/loader.c
patch
|
blob
|
history
diff --git
a/main/loader.c
b/main/loader.c
index
99c9f12
..
d8a9d64
100644
(file)
--- a/
main/loader.c
+++ b/
main/loader.c
@@
-1200,6
+1200,10
@@
int ast_loader_unregister(int (*v)(void))
struct ast_module *ast_module_ref(struct ast_module *mod)
{
+ if (!mod) {
+ return NULL;
+ }
+
ast_atomic_fetchadd_int(&mod->usecount, +1);
ast_update_use_count();
@@
-1208,6
+1212,10
@@
struct ast_module *ast_module_ref(struct ast_module *mod)
void ast_module_unref(struct ast_module *mod)
{
+ if (!mod) {
+ return;
+ }
+
ast_atomic_fetchadd_int(&mod->usecount, -1);
ast_update_use_count();
}