Skip to content

Commit

Permalink
Switch some talloc_free's to TALLOC_FREE's
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Mar 11, 2014
1 parent fbe5234 commit b71e353
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/main/parser.c
Expand Up @@ -997,8 +997,7 @@ static ssize_t condition_tokenize(TALLOC_CTX *ctx, CONF_ITEM *ci, char const *st
rad_assert(c->cast != NULL);

rcode = radius_evaluate_map(NULL, 0, 0, c);
talloc_free(c->data.map);
c->data.map = NULL;
TALLOC_FREE(c->data.map);
c->cast = NULL;
c->regex_i = false;
if (rcode) {
Expand All @@ -1009,7 +1008,7 @@ static ssize_t condition_tokenize(TALLOC_CTX *ctx, CONF_ITEM *ci, char const *st

break; /* don't do the next check */
}

/*
* Two literal strings. They're not parsed as
* VPT_TYPE_DATA because there's no cast to an
Expand All @@ -1021,7 +1020,7 @@ static ssize_t condition_tokenize(TALLOC_CTX *ctx, CONF_ITEM *ci, char const *st

rad_assert(c->cast == NULL);
rad_assert(c->regex_i == false);

rcode = radius_evaluate_map(NULL, 0, 0, c);
if (rcode) {
c->type = COND_TYPE_TRUE;
Expand All @@ -1032,8 +1031,7 @@ static ssize_t condition_tokenize(TALLOC_CTX *ctx, CONF_ITEM *ci, char const *st
/*
* Free map after using it above.
*/
talloc_free(c->data.map);
c->data.map = NULL;
TALLOC_FREE(c->data.map);
break;
}
} while (0);
Expand Down

0 comments on commit b71e353

Please sign in to comment.