Browse Source

* remove FREE() macro

master
Alex 'AdUser' Z 8 years ago
parent
commit
e4e256c4c2
  1. 2
      src/common.h
  2. 3
      src/config.c
  3. 2
      src/filelist.c
  4. 2
      src/ipaddr.c
  5. 2
      src/jail.c
  6. 3
      src/matches.c

2
src/common.h

@ -28,6 +28,4 @@
#define UNUSED(x) (void)(x)
#define FREE(x) free(x), x = NULL
#endif /* F2B_COMMON_H_ */

3
src/config.c

@ -277,7 +277,8 @@ f2b_config_load(f2b_config_t *config, const char *path, bool recursion) {
for (; SECTION->param != NULL; \
SECTION->param = np) { \
np = SECTION->param->next; \
FREE(SECTION->param); \
free(SECTION->param); \
SECTION->param = NULL; \
} \
}

2
src/filelist.c

@ -36,7 +36,7 @@ f2b_filelist_from_glob(const char *pattern) {
continue;
if (f2b_logfile_open(file, globbuf.gl_pathv[i]) == false) {
f2b_log_msg(log_error, "can't open file: %s: %s", globbuf.gl_pathv[i], strerror(errno));
FREE(file);
free(file);
continue;
}
files = f2b_filelist_append(files, file);

2
src/ipaddr.c

@ -32,7 +32,7 @@ f2b_ipaddr_create(const char *addr, size_t matches) {
return a;
cleanup:
FREE(a);
free(a);
return NULL;
}

2
src/jail.c

@ -266,7 +266,7 @@ f2b_jail_init(f2b_jail_t *jail, f2b_config_t *config) {
f2b_log_msg(log_error, "jail '%s': 'source' supports only 'files' for now", jail->name);
return false;
}
if (jail->source_init == '\0') {
if (jail->source_init[0] == '\0') {
f2b_log_msg(log_error, "jail '%s': 'source' requires file or files pattern", jail->name);
return false;
}

3
src/matches.c

@ -24,7 +24,8 @@ void
f2b_matches_destroy(f2b_matches_t *m) {
assert(m != NULL);
FREE(m->times);
free(m->times);
m->times = NULL;
m->used = 0;
m->max = 0;
}

Loading…
Cancel
Save