Fix a variety of memory leaks
[asterisk/asterisk.git] / main / features.c
index 433c1a6..964e536 100644 (file)
@@ -6044,6 +6044,7 @@ static void process_applicationmap_line(struct ast_variable *var)
        } else {
                ast_log(LOG_NOTICE, "Invalid 'ActivateOn' specification for feature '%s',"
                        " must be 'self', or 'peer'\n", var->name);
+               ast_free(feature);
                return;
        }
 
@@ -6058,6 +6059,7 @@ static void process_applicationmap_line(struct ast_variable *var)
        } else {
                ast_log(LOG_NOTICE, "Invalid 'ActivatedBy' specification for feature '%s',"
                        " must be 'caller', or 'callee', or 'both'\n", var->name);
+               ast_free(feature);
                return;
        }