Skip to content

Commit

Permalink
Regex may be NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Feb 27, 2015
1 parent 40641d4 commit 58f8368
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/regex.c
Expand Up @@ -63,18 +63,19 @@ void regex_sub_to_request(REQUEST *request, regex_t **preg, char const *value, s
*/
old_sc = request_data_get(request, request, REQUEST_DATA_REGEX);
if (old_sc) {
RDEBUG4("Clearing %zu matches", old_sc->nmatch);
DEBUG4("Clearing %zu matches", old_sc->nmatch);
talloc_free(old_sc);
} else {
RDEBUG4("No matches");
DEBUG4("No matches");
}

if (nmatch == 0) return;

rad_assert(preg && *preg);
rad_assert(rxmatch);

RDEBUG4("Adding %zu matches", nmatch);
DEBUG4("Adding %zu matches", nmatch);

/*
* Add new_sc matches
*/
Expand Down

0 comments on commit 58f8368

Please sign in to comment.