summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 33c0e71)
raw | patch | inline | side by side (parent: 33c0e71)
author | Krzysztof Matczak <krzysztofx.matczak@intel.com> | |
Fri, 24 Feb 2017 09:38:14 +0000 (09:38 +0000) | ||
committer | Krzysztof Matczak <krzysztofx.matczak@intel.com> | |
Fri, 24 Feb 2017 09:38:14 +0000 (09:38 +0000) |
Change-Id: I058afae8c0a99115bda70e125840fc6bd224b358
Signed-off-by: Krzysztof Matczak <krzysztofx.matczak@intel.com>
Signed-off-by: Krzysztof Matczak <krzysztofx.matczak@intel.com>
src/daemon/utils_match.c | patch | blob | history |
index cd81582584c0278f31097381194a1ffc1b480dd1..be5dfd6ee6a774497edcbed11e84939ee7c57b70 100644 (file)
--- a/src/daemon/utils_match.c
+++ b/src/daemon/utils_match.c
#define UTILS_MATCH_FLAGS_FREE_USER_DATA 0x01
#define UTILS_MATCH_FLAGS_EXCLUDE_REGEX 0x02
+#define UTILS_MATCH_FLAGS_REGEX 0x04
struct cu_match_s {
regex_t regex;
sfree(obj);
return (NULL);
}
+ obj->flags |= UTILS_MATCH_FLAGS_REGEX;
if (excluderegex && strcmp(excluderegex, "") != 0) {
status = regcomp(&obj->excluderegex, excluderegex, REG_EXTENDED);
if (obj == NULL)
return;
- if (obj->flags & UTILS_MATCH_FLAGS_FREE_USER_DATA) {
+ if (obj->flags & UTILS_MATCH_FLAGS_FREE_USER_DATA)
sfree(obj->user_data);
- }
+ if (obj->flags & UTILS_MATCH_FLAGS_REGEX)
+ regfree(&obj->regex);
+ if (obj->flags & UTILS_MATCH_FLAGS_EXCLUDE_REGEX)
+ regfree(&obj->excluderegex);
sfree(obj);
} /* void match_destroy */