[asterisk-commits] res fax: Fix reference leak in fax v21 session new. (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jun 22 21:50:20 CDT 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: res_fax: Fix reference leak in fax_v21_session_new.
......................................................................
res_fax: Fix reference leak in fax_v21_session_new.
fax_v21_session_new created a session details object but only released
the allocation reference during error conditions. fax_session_new adds
it's own reference to details if needed so the caller is always
responsible for cleaning it's own reference.
ASTERISK-26141 #close
Change-Id: Ie7fc52a83b6596ce9ce2d5a2bd9f3e204f48fc88
---
M res/res_fax.c
1 file changed, 2 insertions(+), 5 deletions(-)
Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
George Joseph: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/res/res_fax.c b/res/res_fax.c
index 6282b13..ad6e238 100644
--- a/res/res_fax.c
+++ b/res/res_fax.c
@@ -2846,11 +2846,8 @@
}
v21_details->caps = AST_FAX_TECH_V21_DETECT;
- if (!(v21_session = fax_session_new(v21_details, chan, NULL, NULL))) {
- ao2_ref(v21_details, -1);
- return NULL;
- }
-
+ v21_session = fax_session_new(v21_details, chan, NULL, NULL);
+ ao2_ref(v21_details, -1);
return v21_session;
}
--
To view, visit https://gerrit.asterisk.org/3083
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie7fc52a83b6596ce9ce2d5a2bd9f3e204f48fc88
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-commits
mailing list