[asterisk-commits] bbryant: branch 1.6.0 r131718 - in /branches/1.6.0: ./ main/features.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jul 17 13:15:10 CDT 2008
Author: bbryant
Date: Thu Jul 17 13:15:10 2008
New Revision: 131718
URL: http://svn.digium.com/view/asterisk?view=rev&rev=131718
Log:
Merged revisions 131717 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r131717 | bbryant | 2008-07-17 13:14:42 -0500 (Thu, 17 Jul 2008) | 8 lines
Fix a memory leak in register_group_feature when attempting to register
a feature without specifying a group or feature to register.
(closes issue #13101)
Reported by: eliel
Patches:
features.c.patch uploaded by eliel (license 64)
........
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/main/features.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/main/features.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/features.c?view=diff&rev=131718&r1=131717&r2=131718
==============================================================================
--- branches/1.6.0/main/features.c (original)
+++ branches/1.6.0/main/features.c Thu Jul 17 13:15:10 2008
@@ -1330,6 +1330,16 @@
{
struct feature_group_exten *fge;
+ if (!fg) {
+ ast_log(LOG_NOTICE, "You didn't pass a group!\n");
+ return;
+ }
+
+ if (!feature) {
+ ast_log(LOG_NOTICE, "You didn't pass a feature!\n");
+ return;
+ }
+
if (!(fge = ast_calloc(1, sizeof(*fge))))
return;
@@ -1338,17 +1348,7 @@
return;
}
- if (!fg) {
- ast_log(LOG_NOTICE, "You didn't pass a group!\n");
- return;
- }
-
- if (!feature) {
- ast_log(LOG_NOTICE, "You didn't pass a feature!\n");
- return;
- }
-
- ast_string_field_set(fge, exten, (ast_strlen_zero(exten) ? feature->exten : exten));
+ ast_string_field_set(fge, exten, S_OR(exten, feature->exten));
fge->feature = feature;
More information about the asterisk-commits
mailing list